From 71ba4d58fa41f85bffadc80579ca3710eb4368c4 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 79f4cac42a..44848df846 100644 --- a/src/Mod/Draft/DraftGui.py +++ b/src/Mod/Draft/DraftGui.py @@ -1636,7 +1636,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): @@ -1645,7 +1645,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"""