Part Design: adding const char PDBODYKEY and using. No functional change.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user