diff --git a/Basic_viewer/include/CGAL/Qt/Basic_viewer.h b/Basic_viewer/include/CGAL/Qt/Basic_viewer.h index 2816c1d7712..9e65309c741 100644 --- a/Basic_viewer/include/CGAL/Qt/Basic_viewer.h +++ b/Basic_viewer/include/CGAL/Qt/Basic_viewer.h @@ -100,6 +100,7 @@ public: m_inverse_normal(inverse_normal), m_no_2D_mode(no_2D_mode), m_geometry_feature_enabled(true), + m_prev_scene_empty(true), m_default_color_normal(220, 60, 20), m_ambient_color(0.6f, 0.5f, 0.5f, 0.5f), m_are_buffers_initialized(false) @@ -157,24 +158,6 @@ public: setWindowTitle(title); resize(CGAL_BASIC_VIEWER_INIT_SIZE_X, CGAL_BASIC_VIEWER_INIT_SIZE_Y); - - if (inverse_normal) - { reverse_all_normals(); } - - if(!buf.empty()) - { - auto& bbox=buf.bounding_box(); - double d=CGAL::sqrt(CGAL::squared_distance - (Local_point(bbox.xmin(), bbox.ymin(), bbox.zmin()), - Local_point(bbox.xmax(), bbox.ymax(), bbox.zmax()))); - // std::cout<<"Length of the diagonal: "<showEntireScene(); } + void initialize_vertices_and_edges_size() + { + if(!m_scene.empty()) + { + auto& bbox=m_scene.bounding_box(); + double d=CGAL::sqrt(CGAL::squared_distance + (Local_point(bbox.xmin(), bbox.ymin(), bbox.zmin()), + Local_point(bbox.xmax(), bbox.ymax(), bbox.zmax()))); + // std::cout<<"Length of the diagonal: "<