diff --git a/src/Mod/Draft/draftguitools/gui_base_original.py b/src/Mod/Draft/draftguitools/gui_base_original.py index 91b66878b4..90c42ea81e 100644 --- a/src/Mod/Draft/draftguitools/gui_base_original.py +++ b/src/Mod/Draft/draftguitools/gui_base_original.py @@ -180,6 +180,7 @@ class DraftTool: self.ui.sourceCmd = None if self.planetrack: self.planetrack.finalize() + App.DraftWorkingPlane.restore() if hasattr(Gui, "Snapper"): Gui.Snapper.off() if self.call: @@ -302,4 +303,9 @@ class Modifier(DraftTool): super(Modifier, self).__init__() self.copymode = False + def Activated(self, name="None", noplanesetup=False, is_subtool=False): + super(Modifier, self).Activated(name, noplanesetup, is_subtool) + # call DraftWorkingPlane.save to sync with + # DraftWorkingPlane.restore called in finish method + App.DraftWorkingPlane.save() ## @} diff --git a/src/Mod/Draft/draftguitools/gui_selectplane.py b/src/Mod/Draft/draftguitools/gui_selectplane.py index f780fd1429..adf753db5c 100644 --- a/src/Mod/Draft/draftguitools/gui_selectplane.py +++ b/src/Mod/Draft/draftguitools/gui_selectplane.py @@ -127,6 +127,9 @@ class Draft_SelectPlane: self.taskd.form.fieldGridExtension.valueChanged.connect(self.onSetExtension) self.taskd.form.fieldSnapRadius.valueChanged.connect(self.onSetSnapRadius) + # save previous WP to ensure back to the last used when restored + FreeCAD.DraftWorkingPlane.save() + # Try to find a WP from the current selection if FreeCADGui.Selection.getSelectionEx(FreeCAD.ActiveDocument.Name): if self.handle(): @@ -161,7 +164,6 @@ class Draft_SelectPlane: # Reset everything else FreeCADGui.Control.closeDialog() - FreeCAD.DraftWorkingPlane.restore() FreeCADGui.ActiveDocument.resetEdit() return True