From 8f2a1a3f78c300c8c976cba2fdd01370b7b61eda Mon Sep 17 00:00:00 2001 From: x12sa Date: Sun, 5 Jul 2026 11:33:07 +0200 Subject: [PATCH] fix(flomni): use _flomnigui_is_missing guard in show_cameras Match the deleted-widget detection used by all other flomniGuiTools methods. The previous _flomnigui_check_attribute_not_exists path relied on hasattr(self.gui.flomni, "Image"/"Image_0"), which returns stale/ mismatched results when docks are recreated, leaving an empty window after a user closed the GUI mid sample-transfer. _is_deleted() checks registry membership and reliably triggers a rebuild. --- csaxs_bec/bec_ipython_client/plugins/flomni/gui_tools.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/csaxs_bec/bec_ipython_client/plugins/flomni/gui_tools.py b/csaxs_bec/bec_ipython_client/plugins/flomni/gui_tools.py index f1fc522..eb0ff80 100644 --- a/csaxs_bec/bec_ipython_client/plugins/flomni/gui_tools.py +++ b/csaxs_bec/bec_ipython_client/plugins/flomni/gui_tools.py @@ -90,9 +90,9 @@ class flomniGuiTools: def flomnigui_show_cameras(self): self.flomnigui_show_gui() - if self._flomnigui_check_attribute_not_exists( - "cam_flomni_gripper" - ) or self._flomnigui_check_attribute_not_exists("cam_flomni_overview"): + if self._flomnigui_is_missing("camera_gripper_image") or self._flomnigui_is_missing( + "camera_overview_image" + ): self.flomnigui_remove_all_docks() self.camera_gripper_image = self.gui.flomni.new("Image") if self._flomnicam_check_device_exists(dev.cam_flomni_gripper):