From 21f8b80f5567d1afe5ea90b6c3f65bf4c61721ed Mon Sep 17 00:00:00 2001 From: carlopav Date: Mon, 27 Jan 2020 00:02:26 +0100 Subject: [PATCH] [Draft] Context menu bugfix If "Line" is not translated, the menu is not appended --- src/Mod/Draft/InitGui.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Mod/Draft/InitGui.py b/src/Mod/Draft/InitGui.py index e11bac5a37..d3c83d07b2 100644 --- a/src/Mod/Draft/InitGui.py +++ b/src/Mod/Draft/InitGui.py @@ -155,6 +155,7 @@ class DraftWorkbench(Workbench): Log("Draft workbench deactivated\n") def ContextMenu(self, recipient): + from DraftGui import translate if recipient == "View": if FreeCAD.activeDraftCommand is None: if FreeCADGui.Selection.getSelection(): @@ -163,7 +164,8 @@ class DraftWorkbench(Workbench): else: self.appendContextMenu("Draft", self.cmdList) else: - if FreeCAD.activeDraftCommand.featureName == "Line": + if FreeCAD.activeDraftCommand.featureName == translate("draft","Line"): + # BUG: line subcommands are not usable while another command is active self.appendContextMenu("", self.lineList) else: if FreeCADGui.Selection.getSelection():