+ 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

@@ -25,12 +25,14 @@
#ifndef _PreComp_
# include <Standard_math.hxx>
# include <QCoreApplication>
#endif
#include "ViewProviderFemMeshShapeNetgen.h"
#include "TaskDlgMeshShapeNetgen.h"
#include "Gui/Control.h"
#include <Gui/Control.h>
#include <Gui/MainWindow.h>
using namespace FemGui;
@@ -38,6 +40,8 @@ using namespace FemGui;
/* TRANSLATOR FemGui::ViewProviderFemMeshShapeNetgen */
PROPERTY_SOURCE(FemGui::ViewProviderFemMeshShapeNetgen, FemGui::ViewProviderFemMeshShape)
@@ -63,10 +67,16 @@ bool ViewProviderFemMeshShapeNetgen::setEdit(int ModNum)
if (ModNum == ViewProvider::Default) {
// clear the selection (convenience)
Gui::Selection().clearSelection();
#ifdef FCWithNetgen
Gui::Control().showDialog(new TaskDlgMeshShapeNetgen(this));
return true;
#else
QMessageBox::critical(Gui::getMainWindow(),
QCoreApplication::translate("FemGui::ViewProviderFemMeshShapeNetgen", "Meshing failure"),
QCoreApplication::translate("FemGui::ViewProviderFemMeshShapeNetgen", "The FEM module is built without NETGEN support. Meshing will not work!!!")
);
return false;
#endif
}
else {
return ViewProviderDocumentObject::setEdit(ModNum);