Skip to content

Commit d09f08c

Browse files
committed
[fix] METEOR GUI: handle better incorrect z-stack parameters
Currently, if the user enters incorrect z-stack paramers (eg, a very small zstep, causing > 500 steps), no indication is shown, until they start an acquisition, and then the error is shown in the log, while the GUI stays entirely disabled (because is_acquiring is still set to True). Change so that: * An error message is shown instead of the (incorrect) time estimation * The acquire buttons cannot be pressed * Even if somehow the user manages to start the acquisition, the GUI is not disabled.
1 parent 8ad878c commit d09f08c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/odemis/gui/cont/acquisition/cryo_acq.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,9 @@ def __init__(self, tab_data, panel, tab, mode: guimod.AcquiMode):
134134
self._panel.streams_chk_list.Bind(wx.EVT_CHECKLISTBOX, self._on_check_list)
135135

136136
self._zlevels: Dict[Stream, List[float]] = {}
137+
# When zstack_error is set to a string, it contains the error message to show, explaining
138+
# why a z-stack cannot be done.
139+
self._zstack_error: Optional[str] = None
137140

138141
# common VA's
139142
self._tab_data.filename.subscribe(self._on_filename, init=True)
@@ -653,6 +656,7 @@ def _update_acquisition_time(self):
653656
return
654657

655658
# estimate the total time for acquiring at features
659+
can_acquire = not self._tab_data.main.is_acquiring.value
656660
features = self._get_selected_features()
657661
if not features:
658662
txt = "No features selected."

0 commit comments

Comments
 (0)