From 51120e54131a63504568493b497255af3462be65 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 27 Mar 2018 11:47:53 +0200 Subject: [PATCH] Fix Bbox computation in facegraph_items --- .../Surface_mesh_deformation/Edit_polyhedron_plugin.cpp | 1 + Polyhedron/demo/Polyhedron/Scene_polyhedron_item.cpp | 2 +- Polyhedron/demo/Polyhedron/Scene_surface_mesh_item.cpp | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/Edit_polyhedron_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/Edit_polyhedron_plugin.cpp index 854b6b56f10..9eeccc3d4f7 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/Edit_polyhedron_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/Edit_polyhedron_plugin.cpp @@ -396,6 +396,7 @@ void Polyhedron_demo_edit_polyhedron_plugin::dock_widget_visibility_changed(bool Scene_facegraph_item* item = convert_to_plain_facegraph(i, edit_item); item->setRenderingMode(last_RM); updateSelectionItems(item); + item->itemChanged(); } } } diff --git a/Polyhedron/demo/Polyhedron/Scene_polyhedron_item.cpp b/Polyhedron/demo/Polyhedron/Scene_polyhedron_item.cpp index 6880cabaea3..79378a892f7 100644 --- a/Polyhedron/demo/Polyhedron/Scene_polyhedron_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_polyhedron_item.cpp @@ -1414,7 +1414,7 @@ invalidateOpenGLBuffers() d->init(); Base::invalidateOpenGLBuffers(); are_buffers_filled = false; - + is_bbox_computed = false; d->invalidate_stats(); d->killIds(); } diff --git a/Polyhedron/demo/Polyhedron/Scene_surface_mesh_item.cpp b/Polyhedron/demo/Polyhedron/Scene_surface_mesh_item.cpp index 93bf7e18f11..b81259b49a2 100644 --- a/Polyhedron/demo/Polyhedron/Scene_surface_mesh_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_surface_mesh_item.cpp @@ -921,7 +921,7 @@ void Scene_surface_mesh_item::compute_bbox()const } _bbox = Bbox(bbox.xmin(),bbox.ymin(),bbox.zmin(), bbox.xmax(),bbox.ymax(),bbox.zmax()); - + is_bbox_computed = true; } void Scene_surface_mesh_item::itemAboutToBeDestroyed(Scene_item *item) @@ -1109,6 +1109,7 @@ void Scene_surface_mesh_item::invalidateOpenGLBuffers() d->smesh_->collect_garbage(); are_buffers_filled = false; d->invalidate_stats(); + is_bbox_computed = false; }