From f0fce954d96853948ebac360262fe42cecf19367 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Thu, 15 Mar 2018 15:23:10 +0100 Subject: [PATCH] Make the code for edge_to_facets selection safer. --- .../demo/Polyhedron/Plugins/PMP/Selection_plugin.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/PMP/Selection_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/PMP/Selection_plugin.cpp index a7b20aeb1b2..885a74ba5ac 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PMP/Selection_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/PMP/Selection_plugin.cpp @@ -635,9 +635,12 @@ public Q_SLOTS: const Face_graph& poly = *selection_item->polyhedron(); BOOST_FOREACH(Scene_polyhedron_selection_item::fg_edge_descriptor ed, selection_item->selected_edges) { - selection_item->selected_facets.insert(face(halfedge(ed, poly), poly)); - if(!is_border_edge(halfedge(ed,poly), poly)) + if(!is_border(halfedge(ed,poly), poly)){ + selection_item->selected_facets.insert(face(halfedge(ed, poly), poly)); + } + if(!is_border(opposite(halfedge(ed,poly), poly), poly)){ selection_item->selected_facets.insert(face(opposite(halfedge(ed, poly), poly), poly)); + } } selection_item->invalidateOpenGLBuffers(); selection_item->itemChanged();