Fixed bug that prevented proper switching to PartDesign workbench
This commit is contained in:
committed by
Stefan Tröger
parent
780f27a529
commit
87aa6fbc77
@@ -104,7 +104,7 @@ bool ViewProviderBody::doubleClicked(void)
|
||||
// assure the PartDesign workbench
|
||||
Gui::Command::assureWorkbench("PartDesignWorkbench");
|
||||
Gui::Command::addModule(Gui::Command::Gui,"PartDesignGui");
|
||||
Gui::Command::doCommand(Gui::Command::Doc,"PartDesignGui.setActivePart(App.activeDocument().%s)",this->getObject()->getNameInDocument());
|
||||
Gui::Command::doCommand(Gui::Command::Gui,"PartDesignGui.setActivePart(App.activeDocument().%s)",this->getObject()->getNameInDocument());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -332,7 +332,7 @@ void switchToDocument(const App::Document* doc)
|
||||
activeBody = static_cast<PartDesign::Body*>(bodies.front());
|
||||
|
||||
if (activeBody != NULL) {
|
||||
//Gui::Command::doCommand(Gui::Command::Doc,"import PartDesignGui");
|
||||
Gui::Command::doCommand(Gui::Command::Doc,"import PartDesignGui");
|
||||
Gui::Command::doCommand(Gui::Command::Gui,"PartDesignGui.setActivePart(App.activeDocument().%s)", activeBody->getNameInDocument());
|
||||
} else {
|
||||
QMessageBox::critical(Gui::getMainWindow(), QObject::tr("Could not create body"),
|
||||
@@ -595,7 +595,7 @@ void Workbench::deactivated()
|
||||
removeTaskWatcher();
|
||||
// reset the active Body
|
||||
Gui::Command::doCommand(Gui::Command::Doc,"import PartDesignGui");
|
||||
Gui::Command::doCommand(Gui::Command::Doc,"PartDesignGui.setActivePart(None)");
|
||||
Gui::Command::doCommand(Gui::Command::Gui,"PartDesignGui.setActivePart(None)");
|
||||
|
||||
Gui::Workbench::deactivated();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user