Switch to PartDesign workbench as soon as a PartDesign feature is edited
This commit is contained in:
committed by
Stefan Tröger
parent
ce224298a7
commit
8682b5f490
@@ -102,8 +102,9 @@ bool ViewProviderRevolution::setEdit(int ModNum)
|
||||
|
||||
// clear the selection (convenience)
|
||||
Gui::Selection().clearSelection();
|
||||
//if (ModNum == 1)
|
||||
// Gui::Command::openCommand("Change revolution parameters");
|
||||
|
||||
// always change to PartDesign WB, remember where we come from
|
||||
oldWb = Gui::Command::assureWorkbench("PartDesignWorkbench");
|
||||
|
||||
// start the edit dialog
|
||||
if (padDlg)
|
||||
@@ -120,10 +121,10 @@ bool ViewProviderRevolution::setEdit(int ModNum)
|
||||
|
||||
void ViewProviderRevolution::unsetEdit(int ModNum)
|
||||
{
|
||||
if (ModNum == ViewProvider::Default) {
|
||||
// and update the pad
|
||||
//getSketchObject()->getDocument()->recompute();
|
||||
// return to the WB we were in before editing the PartDesign feature
|
||||
Gui::Command::assureWorkbench(oldWb.c_str());
|
||||
|
||||
if (ModNum == ViewProvider::Default) {
|
||||
// when pressing ESC make sure to close the dialog
|
||||
Gui::Control().closeDialog();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user