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.
This commit is contained in:
Roy-043
2025-03-21 19:56:38 +01:00
parent c20cc6804f
commit 3f4ef384cf

View File

@@ -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"""