diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_triangulate_facets_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_triangulate_facets_plugin.cpp index 55db648ec36..99e8dc370f3 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_triangulate_facets_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_triangulate_facets_plugin.cpp @@ -42,7 +42,11 @@ public: } bool applicable() const { - return qobject_cast(scene->item(scene->mainSelectionIndex())); + Q_FOREACH(Scene_interface::Item_id index, scene->selectionIndices()) { + Scene_polyhedron_item* item = qobject_cast(scene->item(index)); + if(!item) return false; + } + return true; }