Skip to content

Commit

Permalink
Notification to the user that a body is not active when inserting a d…
Browse files Browse the repository at this point in the history
…atum entity - fixes #2511
  • Loading branch information
abdullahtahiriyo authored and wwmayer committed May 31, 2017
1 parent 7863a63 commit 4b04253
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Mod/PartDesign/Gui/Command.cpp
Expand Up @@ -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()));
Expand Down

0 comments on commit 4b04253

Please sign in to comment.