From 037d8244f5926a5b24e6807b339fe1b350d3c195 Mon Sep 17 00:00:00 2001 From: Roy-043 Date: Fri, 21 Mar 2025 19:56:38 +0100 Subject: [PATCH] Draft: show and hide Tray with delay Without this delay the Tray may not display if Draft is the start-up workbench. When the Draft workbench is autoloaded the Tray is shown and then immediately hidden. Because of this, hiding the tray must also happen with a delay. --- src/Mod/Draft/DraftGui.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Mod/Draft/DraftGui.py b/src/Mod/Draft/DraftGui.py index 1a86ac0dec..d3c702a7f5 100644 --- a/src/Mod/Draft/DraftGui.py +++ b/src/Mod/Draft/DraftGui.py @@ -1631,7 +1631,7 @@ class DraftToolBar: def Activated(self): self.setWatchers() if hasattr(self,"tray"): - self.tray.show() + todo.delay(self.tray.show, None) def Deactivated(self): if (FreeCAD.activeDraftCommand is not None): @@ -1640,7 +1640,7 @@ class DraftToolBar: FreeCADGui.Control.clearTaskWatcher() #self.tray = None if hasattr(self,"tray"): - self.tray.hide() + todo.delay(self.tray.hide, None) def reset_ui_values(self): """Method to reset task panel values"""