auto WB switching for editing Sketches and new TaskWatcher

This commit is contained in:
jriegel
2012-05-18 14:43:35 +02:00
committed by Stefan Tröger
parent f5cfa8d72a
commit db460cff8a
5 changed files with 28 additions and 10 deletions

View File

@@ -4156,6 +4156,9 @@ void ViewProviderSketch::setupContextMenu(QMenu *menu, QObject *receiver, const
bool ViewProviderSketch::setEdit(int ModNum)
{
// always change to sketcher WB, remember where we come from
oldWb = Gui::Command::assureWorkbench("SketcherWorkbench");
// When double-clicking on the item for this sketch the
// object unsets and sets its edit mode without closing
// the task panel
@@ -4580,6 +4583,9 @@ void ViewProviderSketch::unsetEdit(int ModNum)
// when pressing ESC make sure to close the dialog
Gui::Control().closeDialog();
// return to the WB before edeting the sketch
Gui::Command::assureWorkbench(oldWb.c_str());
}
void ViewProviderSketch::setEditViewer(Gui::View3DInventorViewer* viewer, int ModNum)

View File

@@ -382,6 +382,7 @@ protected:
bool relative;
Gui::Rubberband* rubberband;
std::string oldWb;
};
} // namespace PartGui