mirror of https://github.com/CGAL/cgal
Bug fix to Polyhedron_demo_triangulate_facets_plugin::applicable()
The following commit:
| commit 1bc5244886
| Author: Philipp Möller <Philipp.Moeller@geometryfactory.com>
| Date: Wed Jul 11 13:15:37 2012 +0000
|
| Filter the Operations menu by querying plug-ins for the applicability.
|
| Some meta-programming might make that mechanism less boiler-plate-y,
| but it is fine for now.
|
| Notes:
| r70473 branches/features/Point_set_and_Polyhedron_demo-merge-GF
was not right for triangulate_facets_plugin. The
applicable() must aknowledge the fact that the triangulate_facets_plugin
can triangulate a collection of polyhedra, and not only one.
This commit is contained in:
parent
122e19af9b
commit
88b2d599b8
|
|
@ -42,7 +42,11 @@ public:
|
|||
}
|
||||
|
||||
bool applicable() const {
|
||||
return qobject_cast<Scene_polyhedron_item*>(scene->item(scene->mainSelectionIndex()));
|
||||
Q_FOREACH(Scene_interface::Item_id index, scene->selectionIndices()) {
|
||||
Scene_polyhedron_item* item = qobject_cast<Scene_polyhedron_item*>(scene->item(index));
|
||||
if(!item) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue