mirror of https://github.com/CGAL/cgal
Keep the user from saving an invalid c3t3 file.
This commit is contained in:
parent
01252a3d7d
commit
9383a7607c
|
|
@ -196,6 +196,11 @@ Polyhedron_demo_c3t3_binary_io_plugin::
|
|||
save(QFileInfo fileinfo, QList<Scene_item *> &items)
|
||||
{
|
||||
Scene_item* item = items.front();
|
||||
if(!qobject_cast<Scene_c3t3_item*>(item)->is_valid())
|
||||
{
|
||||
QMessageBox::warning(CGAL::Three::Three::mainWindow(), "", "The c3t3_item is not valid. You cannot save it.");
|
||||
return false;
|
||||
}
|
||||
const Scene_c3t3_item* c3t3_item = qobject_cast<const Scene_c3t3_item*>(item);
|
||||
if ( NULL == c3t3_item )
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue