From 393da0d6d9c00c35f1ef065ac04437cb6dc11185 Mon Sep 17 00:00:00 2001 From: wmayer Date: Thu, 1 Oct 2020 16:03:08 +0200 Subject: [PATCH] Gui: [skip ci] add an alias for Gui.isCommandActive --- src/Gui/FreeCADGuiInit.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Gui/FreeCADGuiInit.py b/src/Gui/FreeCADGuiInit.py index efe04edef7..e7ebbacafc 100644 --- a/src/Gui/FreeCADGuiInit.py +++ b/src/Gui/FreeCADGuiInit.py @@ -34,8 +34,10 @@ import FreeCAD, FreeCADGui # shortcuts Gui = FreeCADGui + # this is to keep old code working Gui.listCommands = Gui.Command.listAll +Gui.isCommandActive = lambda cmd: Gui.Command.get(cmd).isActive() # Important definitions class Workbench: