Fixed bug that prevented proper switching to PartDesign workbench

This commit is contained in:
jrheinlaender
2013-08-23 14:48:01 +02:00
committed by Stefan Tröger
parent 780f27a529
commit 87aa6fbc77
2 changed files with 3 additions and 3 deletions

View File

@@ -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;
}

View File

@@ -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();