Notification to the user that a body is not active when inserting a datum entity - fixes #2511

This commit is contained in:
Abdullah Tahiri
2017-05-31 00:15:39 +02:00
committed by wmayer
parent 7863a63659
commit 4b042536f8

View File

@@ -133,6 +133,8 @@ void UnifiedDatumCommand(Gui::Command &cmd, Base::Type type, std::string name)
}
cmd.doCommand(Gui::Command::Doc,"App.activeDocument().recompute()"); // recompute the feature based on its references
cmd.doCommand(Gui::Command::Gui,"Gui.activeDocument().setEdit('%s')",FeatName.c_str());
} else {
QMessageBox::warning(Gui::getMainWindow(),QObject::tr("Error"), QObject::tr("There is no active body. Please make a body active before inserting a datum entity."));
}
} catch (Base::Exception &e) {
QMessageBox::warning(Gui::getMainWindow(),QObject::tr("Error"),QString::fromLatin1(e.what()));