+ raise error message when trying to mesh without netgen support

This commit is contained in:
wmayer
2015-05-22 16:15:18 +02:00
parent 8a35c47465
commit e12854af50
3 changed files with 26 additions and 7 deletions

View File

@@ -34,6 +34,7 @@
#include <Gui/Application.h>
#include <Gui/Document.h>
#include <Gui/Command.h>
#include <Gui/MainWindow.h>
#include <Gui/WaitCursor.h>
#include "ViewProviderFemMeshShapeNetgen.h"
@@ -98,7 +99,13 @@ bool TaskDlgMeshShapeNetgen::accept()
if(param->touched)
{
Gui::WaitCursor wc;
FemMeshShapeNetgenObject->recompute();
App::DocumentObjectExecReturn* ret = FemMeshShapeNetgenObject->recompute();
if (ret) {
wc.restoreCursor();
QMessageBox::critical(Gui::getMainWindow(), tr("Meshing failure"), QString::fromStdString(ret->Why));
delete ret;
return true;
}
}
// hide the input object