From c255a33ad888096062256d3d9105fba16d5060ff Mon Sep 17 00:00:00 2001 From: dovydasv2 Date: Wed, 21 Aug 2024 10:41:32 -0700 Subject: [PATCH] Added extra redundancy to ensure correct acquire ui is shown after protocol --- lumaviewpro.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lumaviewpro.py b/lumaviewpro.py index eb92481..53462c8 100644 --- a/lumaviewpro.py +++ b/lumaviewpro.py @@ -3627,6 +3627,7 @@ def _is_protocol_valid(self) -> bool: def _autofocus_run_complete_callback(self, **kwargs): live_histo_reverse() + reset_acquire_ui() self._reset_run_autofocus_scan_button() # Copy the Z-heights from the autofocus scan into the protocol @@ -3705,6 +3706,7 @@ def _scan_run_complete(self, **kwargs): self._reset_run_scan_button() create_hyperstacks_if_needed() live_histo_reverse() + reset_acquire_ui() def run_scan_from_ui(self): @@ -3752,6 +3754,7 @@ def _protocol_run_complete(self, **kwargs): self._reset_run_protocol_button() live_histo_reverse() create_hyperstacks_if_needed() + reset_acquire_ui() def run_protocol_from_ui(self): @@ -4896,6 +4899,15 @@ def update_shader(self, dt): else: lumaview.ids['viewer_id'].update_shader('none') +def reset_acquire_ui(): + for layer in common_utils.get_layers(): + if settings[layer]['acquire'] == "image": + lumaview.ids['imagesettings_id'].ids[layer].ids['acquire_image'].active = True + elif settings[layer]['acquire'] == "video": + lumaview.ids['imagesettings_id'].ids[layer].ids['acquire_video'].active = True + else: + lumaview.ids['imagesettings_id'].ids[layer].ids['acquire_none'].active = True + # Z Stack functions class # --------------------------------------------------------------------- class ZStack(CompositeCapture):