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

@@ -52,7 +52,7 @@ ViewProvider::~ViewProvider()
bool ViewProvider::doubleClicked(void)
{
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
@@ -85,7 +85,7 @@ void ViewProvider::unsetEdit(int ModNum)
if (ModNum == ViewProvider::Default) {
// when pressing ESC make sure to close the dialog
PartDesign::Body* activeBody = Gui::Application::Instance->activeView()->getActiveObject<PartDesign::Body*>("Body");
PartDesign::Body* activeBody = Gui::Application::Instance->activeView()->getActiveObject<PartDesign::Body*>(PDBODYKEY);
Gui::Control().closeDialog();
if ((activeBody != NULL) && (oldTip != NULL)) {
Gui::Selection().clearSelection();