From 1dd4fd636cf36fe64bf5d5903d7185aa06f2de14 Mon Sep 17 00:00:00 2001 From: Roy-043 Date: Mon, 7 Oct 2024 11:18:58 +0200 Subject: [PATCH] More logical implementation of the fix. --- src/Mod/Draft/DraftGui.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Mod/Draft/DraftGui.py b/src/Mod/Draft/DraftGui.py index bc5fd43d51..1c9368036f 100644 --- a/src/Mod/Draft/DraftGui.py +++ b/src/Mod/Draft/DraftGui.py @@ -143,9 +143,8 @@ class DraftTaskPanel: # https://github.com/FreeCAD/FreeCAD/issues/17027 # Function can be called multiple times if Esc is pressed during mouse # move. We need to prevent multiple calls to draftToolBar.escape(): - if getattr(FreeCAD, "activeDraftCommand", None) is None: + if not FreeCADGui.draftToolBar.isTaskOn: return - FreeCAD.activeDraftCommand = None FreeCADGui.draftToolBar.isTaskOn = False FreeCADGui.draftToolBar.escape() if FreeCADGui.ActiveDocument: