mirror of https://github.com/CGAL/cgal
Mesh menu is now File menu.
Added an entry "Clear seeds" to file menu. Fix markers when points or segments are entered. Fix is_mesh_initialized values.
This commit is contained in:
parent
56786f7e67
commit
e0991b8cf4
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in New Issue