@@ -135,10 +135,10 @@ def progress_bar(self, images_received, microscope_state, mode, stop=False):
135135
136136 if mode == "single" :
137137 number_of_slices = 1
138- elif mode == "live" or mode == "customized" :
139- number_of_slices = 1
140138 elif mode == "z-stack" :
141139 number_of_slices = microscope_state ["number_z_steps" ]
140+ else :
141+ number_of_slices = 1
142142
143143 top_anticipated_images = number_of_slices
144144 bottom_anticipated_images = (
@@ -151,12 +151,7 @@ def progress_bar(self, images_received, microscope_state, mode, stop=False):
151151 if images_received > 0 :
152152 # Update progress bars according to imaging mode.
153153 if stop is False :
154- if mode == "live" or mode == "customized" :
155- self .view .CurAcq .start ()
156- self .view .OvrAcq .start ()
157- self .view .total_acquisition_label .config (text = "--:--:--" )
158-
159- else :
154+ if mode == "z-stack" or mode == "single" :
160155 # Calculate the number of images remaining.
161156 # Time is estimated from the framerate, which includes stage
162157 # movement time inherently.
@@ -166,6 +161,10 @@ def progress_bar(self, images_received, microscope_state, mode, stop=False):
166161 self .update_progress_label (seconds_left )
167162 except ZeroDivisionError :
168163 pass
164+ else :
165+ self .view .CurAcq .start ()
166+ self .view .OvrAcq .start ()
167+ self .view .total_acquisition_label .config (text = "--:--:--" )
169168
170169 if mode == "z-stack" :
171170 top_percent_complete = 100 * (
0 commit comments