From 3236dfb07f477fb87bcbcd0ee983781d5281beb6 Mon Sep 17 00:00:00 2001 From: wyzula-jan Date: Mon, 26 Jan 2026 14:51:35 +0100 Subject: [PATCH] fix(advanced_dock_area): removed the singleShot for load_initial_profile --- .../containers/advanced_dock_area/advanced_dock_area.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bec_widgets/widgets/containers/advanced_dock_area/advanced_dock_area.py b/bec_widgets/widgets/containers/advanced_dock_area/advanced_dock_area.py index 4955b0da..e9f85b9a 100644 --- a/bec_widgets/widgets/containers/advanced_dock_area/advanced_dock_area.py +++ b/bec_widgets/widgets/containers/advanced_dock_area/advanced_dock_area.py @@ -246,11 +246,10 @@ class AdvancedDockArea(DockAreaWidget): if self._profile_exists("general", namespace): init_profile = "general" if init_profile: - # Defer initial load to the event loop so child widgets exist before state restore. - QTimer.singleShot(0, lambda: self._load_initial_profile(init_profile)) + self._load_initial_profile(init_profile) def _load_initial_profile(self, name: str) -> None: - """Load the initial profile after construction when the event loop is running.""" + """Load the initial profile.""" self.load_profile(name, start_empty=self._start_empty) combo = self.toolbar.components.get_action("workspace_combo").widget combo.blockSignals(True)