diff --git a/Packages/Mesh_2/demo/Mesh_2/mesh_demo.C b/Packages/Mesh_2/demo/Mesh_2/mesh_demo.C index 79196724432..8b4e87d6ee0 100644 --- a/Packages/Mesh_2/demo/Mesh_2/mesh_demo.C +++ b/Packages/Mesh_2/demo/Mesh_2/mesh_demo.C @@ -396,11 +396,12 @@ public: // MENUS QPopupMenu *pmMesh = new QPopupMenu(this); - menuBar()->insertItem("&Mesh", pmMesh); + menuBar()->insertItem("&File", pmMesh); pmMesh->insertItem("&Refine mesh", this, SLOT(refineMesh()), CTRL+Key_R ); pmMesh->insertItem("&Clear mesh", this, SLOT(clearMesh()), CTRL+Key_C ); + pmMesh->insertItem("Clear seeds", this, SLOT(clearSeeds())); pmMesh->insertItem("&Open constrained triangulation...", this, SLOT(openTriangulation()), CTRL+Key_O ); @@ -511,9 +512,11 @@ public slots: } else // get_point is active { - seeds->clear(); switch_to_triangulation(); triangulation->insert(p); + switch_to_mesh(); + mesh->mark_facets(seeds->begin(), seeds->end()); + is_mesh_initialized = false; } else if (CGAL::assign(poly,obj)) @@ -523,6 +526,9 @@ public slots: it!=poly.edges_end(); it++) triangulation->insert((*it).source(),(*it).target()); + switch_to_mesh(); + mesh->mark_facets(seeds->begin(), seeds->end()); + is_mesh_initialized = false; } widget->redraw(); } @@ -641,6 +647,13 @@ public slots: widget->redraw(); } + void clearSeeds() + { + seeds->clear(); + mesh->mark_facets(seeds->begin(), seeds->end()); + widget->redraw(); + } + void openTriangulation() { switch_to_mesh();