From 6877cbbd515a84199723a05361fff10e89e4220c Mon Sep 17 00:00:00 2001 From: blobfish Date: Wed, 29 Apr 2015 10:17:22 -0400 Subject: [PATCH] updating to setActiveObject call --- src/Mod/PartDesign/Gui/Command.cpp | 6 +++--- src/Mod/PartDesign/Gui/ViewProviderBody.cpp | 2 +- src/Mod/PartDesign/Gui/Workbench.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Mod/PartDesign/Gui/Command.cpp b/src/Mod/PartDesign/Gui/Command.cpp index 762883a4eb..bc5df6cdcd 100644 --- a/src/Mod/PartDesign/Gui/Command.cpp +++ b/src/Mod/PartDesign/Gui/Command.cpp @@ -123,7 +123,7 @@ void CmdPartDesignBody::activated(int iMsg) //doCommand(Doc,"App.activeDocument().%s.Model = []",FeatName.c_str()); //doCommand(Doc,"App.activeDocument().%s.Tip = None",FeatName.c_str()); addModule(Gui,"PartDesignGui"); // import the Gui module only once a session - doCommand(Gui,"PartDesignGui.setActiveBody(App.ActiveDocument.%s)", FeatName.c_str()); + doCommand(Gui::Command::Gui, "Gui.activeView().setActiveObject('Body',App.activeDocument().%s)", FeatName.c_str()); // Make the "Create sketch" prompt appear in the task panel doCommand(Gui,"Gui.Selection.clearSelection()"); doCommand(Gui,"Gui.Selection.addSelection(App.ActiveDocument.%s)", FeatName.c_str()); @@ -174,7 +174,7 @@ void CmdPartDesignMoveTip::activated(int iMsg) // Switch to other body pcActiveBody = static_cast(Part::BodyBase::findBodyOf(selFeature)); if (pcActiveBody != NULL) - Gui::Command::doCommand(Gui::Command::Gui,"PartDesignGui.setActiveBody(App.activeDocument().%s)", + Gui::Command::doCommand(Gui::Command::Gui, "Gui.activeView().setActiveObject('Body',App.activeDocument().%s)", pcActiveBody->getNameInDocument()); else return; @@ -244,7 +244,7 @@ void CmdPartDesignDuplicateSelection::activated(int iMsg) // Switch to other body pcActiveBody = static_cast(Part::BodyBase::findBodyOf(selFeature)); if (pcActiveBody != NULL) - Gui::Command::doCommand(Gui::Command::Gui,"PartDesignGui.setActiveBody(App.activeDocument().%s)", + Gui::Command::doCommand(Gui::Command::Gui, "Gui.activeView().setActiveObject('Body',App.activeDocument().%s)", pcActiveBody->getNameInDocument()); else return; diff --git a/src/Mod/PartDesign/Gui/ViewProviderBody.cpp b/src/Mod/PartDesign/Gui/ViewProviderBody.cpp index 3ec58f7312..b23e609a64 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderBody.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderBody.cpp @@ -105,7 +105,7 @@ bool ViewProviderBody::doubleClicked(void) // assure the PartDesign workbench Gui::Command::assureWorkbench("PartDesignWorkbench"); //Gui::Command::doCommand(Gui::Command::Gui,"PartDesignGui.setActiveBody(App.activeDocument().%s)",this->getObject()->getNameInDocument()); - Gui::Command::doCommand(Gui::Command::Gui,"Gui.activeView.setActiveBody(App.activeDocument().%s)",this->getObject()->getNameInDocument()); + Gui::Command::doCommand(Gui::Command::Gui, "Gui.activeView().setActiveObject('Body',App.activeDocument().%s)",this->getObject()->getNameInDocument()); return true; } diff --git a/src/Mod/PartDesign/Gui/Workbench.cpp b/src/Mod/PartDesign/Gui/Workbench.cpp index 25ef5573d7..e9581401a6 100644 --- a/src/Mod/PartDesign/Gui/Workbench.cpp +++ b/src/Mod/PartDesign/Gui/Workbench.cpp @@ -682,7 +682,7 @@ void Workbench::deactivated() removeTaskWatcher(); // reset the active Body Gui::Command::doCommand(Gui::Command::Doc,"import PartDesignGui"); - Gui::Command::doCommand(Gui::Command::Gui,"PartDesignGui.setActiveBody(None)"); + Gui::Command::doCommand(Gui::Command::Gui, "Gui.activeView().setActiveObject('Body',App.activeDocument().%s)", "None"); Gui::Workbench::deactivated();