some adjustments on WB auto-switch
This commit is contained in:
parent
db460cff8a
commit
71b9ded9a1
|
@ -142,18 +142,19 @@ void Workbench::activated()
|
|||
"Part_Box"
|
||||
));
|
||||
|
||||
// set the previous used active Body
|
||||
if(oldActive != "")
|
||||
Gui::Command::doCommand(Gui::Command::Doc,"PartDesignGui.setActivePart(App.activeDocument().%s)",oldActive.c_str());
|
||||
|
||||
addTaskWatcher(Watcher);
|
||||
Gui::Control().showTaskView();
|
||||
|
||||
// set the previous used active Body
|
||||
if(oldActive != "")
|
||||
Gui::Command::doCommand(Gui::Command::Doc,"PartDesignGui.setActivePart(App.activeDocument().%s)",oldActive.c_str());
|
||||
|
||||
|
||||
}
|
||||
|
||||
void Workbench::deactivated()
|
||||
{
|
||||
removeTaskWatcher();
|
||||
// remember the body for later activation
|
||||
if(ActivePartObject)
|
||||
oldActive = ActivePartObject->getNameInDocument();
|
||||
|
@ -163,7 +164,6 @@ void Workbench::deactivated()
|
|||
Gui::Command::doCommand(Gui::Command::Doc,"PartDesignGui.setActivePart(None)");
|
||||
|
||||
Gui::Workbench::deactivated();
|
||||
removeTaskWatcher();
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -4584,6 +4584,8 @@ void ViewProviderSketch::unsetEdit(int ModNum)
|
|||
// when pressing ESC make sure to close the dialog
|
||||
Gui::Control().closeDialog();
|
||||
|
||||
//Gui::Application::Instance->
|
||||
|
||||
// return to the WB before edeting the sketch
|
||||
Gui::Command::assureWorkbench(oldWb.c_str());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user