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
@@ -92,8 +92,9 @@ bool ViewProviderPocket::setEdit(int ModNum)
|
||||
|
||||
// clear the selection (convenience)
|
||||
Gui::Selection().clearSelection();
|
||||
//if(ModNum == ViewProvider::Default)
|
||||
// Gui::Command::openCommand("Change pocket parameters");
|
||||
|
||||
// always change to PartDesign WB, remember where we come from
|
||||
oldWb = Gui::Command::assureWorkbench("PartDesignWorkbench");
|
||||
|
||||
// start the edit dialog
|
||||
if (padDlg)
|
||||
@@ -110,10 +111,10 @@ bool ViewProviderPocket::setEdit(int ModNum)
|
||||
|
||||
void ViewProviderPocket::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