diff --git a/src/Mod/Arch/InitGui.py b/src/Mod/Arch/InitGui.py index 0a95abda0..44f070823 100644 --- a/src/Mod/Arch/InitGui.py +++ b/src/Mod/Arch/InitGui.py @@ -93,7 +93,8 @@ class ArchWorkbench(Workbench): "Draft_SelectGroup","Draft_SelectPlane", "Draft_ShowSnapBar","Draft_ToggleGrid","Draft_UndoLine", "Draft_FinishLine","Draft_CloseLine"] - self.draftutils = ["Draft_Heal","Draft_FlipDimension"] + self.draftutils = ["Draft_Heal","Draft_FlipDimension", + "Draft_ToggleConstructionMode","Draft_ToggleContinueMode"] self.snapList = ['Draft_Snap_Lock','Draft_Snap_Midpoint','Draft_Snap_Perpendicular', 'Draft_Snap_Grid','Draft_Snap_Intersection','Draft_Snap_Parallel', 'Draft_Snap_Endpoint','Draft_Snap_Angle','Draft_Snap_Center', diff --git a/src/Mod/Draft/DraftGui.py b/src/Mod/Draft/DraftGui.py index 535fad219..8f7bb1198 100644 --- a/src/Mod/Draft/DraftGui.py +++ b/src/Mod/Draft/DraftGui.py @@ -1304,18 +1304,23 @@ class DraftToolBar: self.constrMode = checked def toggleContinue(self): - self.continueCmd.toggle() - if hasattr(self,"panel"): - if hasattr(self.panel,"form"): - if isinstance(self.panel.form,list): - for w in self.panel.form: - c = w.findChild(QtGui.QCheckBox,"ContinueCmd") + self.continueMode = not self.continueMode + try: + if hasattr(self,"continueCmd"): + self.continueCmd.toggle() + if hasattr(self,"panel"): + if hasattr(self.panel,"form"): + if isinstance(self.panel.form,list): + for w in self.panel.form: + c = w.findChild(QtGui.QCheckBox,"ContinueCmd") + if c: + c.toggle() + else: + c = self.panel.form.findChild(QtGui.QCheckBox,"ContinueCmd") if c: c.toggle() - else: - c = self.panel.form.findChild(QtGui.QCheckBox,"ContinueCmd") - if c: - c.toggle() + except: + pass def isConstructionMode(self): if self.tray or (not self.taskmode): diff --git a/src/Mod/Draft/DraftTools.py b/src/Mod/Draft/DraftTools.py index 7a626a713..bce3cf42a 100644 --- a/src/Mod/Draft/DraftTools.py +++ b/src/Mod/Draft/DraftTools.py @@ -2944,7 +2944,8 @@ class ToggleConstructionMode(): "The Draft_ToggleConstructionMode FreeCAD command definition" def GetResources(self): - return {'MenuText': QtCore.QT_TRANSLATE_NOOP("Draft_ToggleConstructionMode", "Toggle construcion Mode"), + return {'Pixmap' : 'Draft_Construction', + 'MenuText': QtCore.QT_TRANSLATE_NOOP("Draft_ToggleConstructionMode", "Toggle construcion Mode"), 'Accel' : "C, M", 'ToolTip': QtCore.QT_TRANSLATE_NOOP("Draft_ToggleConstructionMode", "Toggles the Construction Mode for next objects.")} @@ -2956,11 +2957,12 @@ class ToggleContinueMode(): "The Draft_ToggleContinueMode FreeCAD command definition" def GetResources(self): - return {'MenuText': QtCore.QT_TRANSLATE_NOOP("Draft_ToggleContinueMode", "Toggle continue Mode"), + return {'Pixmap' : 'Draft_Rotate', + 'MenuText': QtCore.QT_TRANSLATE_NOOP("Draft_ToggleContinueMode", "Toggle Continue Mode"), 'ToolTip': QtCore.QT_TRANSLATE_NOOP("Draft_ToggleContinueMode", "Toggles the Continue Mode for next commands.")} def Activated(self): - FreeCADGui.draftToolBar.continueCmd.toggle() + FreeCADGui.draftToolBar.toggleContinue() class Drawing(Modifier): diff --git a/src/Mod/Draft/InitGui.py b/src/Mod/Draft/InitGui.py index bbd8f097c..c7bc60ee8 100644 --- a/src/Mod/Draft/InitGui.py +++ b/src/Mod/Draft/InitGui.py @@ -118,7 +118,8 @@ class DraftWorkbench (Workbench): "Draft_SelectGroup","Draft_SelectPlane", "Draft_ShowSnapBar","Draft_ToggleGrid"] self.lineList = ["Draft_UndoLine","Draft_FinishLine","Draft_CloseLine"] - self.utils = ["Draft_Heal","Draft_FlipDimension"] + self.utils = ["Draft_Heal","Draft_FlipDimension", + "Draft_ToggleConstructionMode","Draft_ToggleContinueMode"] self.snapList = ['Draft_Snap_Lock','Draft_Snap_Midpoint','Draft_Snap_Perpendicular', 'Draft_Snap_Grid','Draft_Snap_Intersection','Draft_Snap_Parallel', 'Draft_Snap_Endpoint','Draft_Snap_Angle','Draft_Snap_Center',