Part Design: adding const char PDBODYKEY and using. No functional change.

This commit is contained in:
blobfish
2015-05-01 15:39:50 -04:00
committed by Stefan Tröger
parent 56af3ca44d
commit 10a7f15c37
11 changed files with 31 additions and 29 deletions

View File

@@ -276,7 +276,7 @@ bool ViewProviderDatum::doubleClicked(void)
std::string Msg("Edit ");
Msg += this->pcObject->Label.getValue();
Gui::Command::openCommand(Msg.c_str());
PartDesign::Body* activeBody = Gui::Application::Instance->activeView()->getActiveObject<PartDesign::Body*>("Body");
PartDesign::Body* activeBody = Gui::Application::Instance->activeView()->getActiveObject<PartDesign::Body*>(PDBODYKEY);
if (activeBody != NULL) {
// Drop into insert mode so that the user doesn't see all the geometry that comes later in the tree
// Also, this way the user won't be tempted to use future geometry as external references for the sketch
@@ -301,7 +301,7 @@ void ViewProviderDatum::unsetEdit(int ModNum)
if (ModNum == ViewProvider::Default) {
// when pressing ESC make sure to close the dialog
Gui::Control().closeDialog();
PartDesign::Body* activeBody = Gui::Application::Instance->activeView()->getActiveObject<PartDesign::Body*>("Body");
PartDesign::Body* activeBody = Gui::Application::Instance->activeView()->getActiveObject<PartDesign::Body*>(PDBODYKEY);
if ((activeBody != NULL) && (oldTip != NULL)) {
Gui::Selection().clearSelection();