Notification to the user that a body is not active when inserting a datum entity - fixes #2511
This commit is contained in:
@@ -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()));
|
||||
|
||||
Reference in New Issue
Block a user