From edac36d4df2a21fa658b735bd8b5ca3ec6518f2f Mon Sep 17 00:00:00 2001 From: "Zheng, Lei" Date: Sat, 25 Apr 2020 18:30:07 +0800 Subject: [PATCH] gui: improve backward compatibility --- freecad/asm3/gui.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/freecad/asm3/gui.py b/freecad/asm3/gui.py index 61fe3a4..3cf62be 100644 --- a/freecad/asm3/gui.py +++ b/freecad/asm3/gui.py @@ -103,7 +103,9 @@ class SelectionObserver: hasSelection = FreeCADGui.Selection.hasSelection() for cmd in self.cmds: cmd.onSelectionChange(hasSelection) - FreeCADGui.updateCommands() + update = getattr(FreeCADGui, 'updateCommands', None) + if update: + update() def addSelection(self,docname,objname,subname,_pos): self.onChange()