Skip to content

Commit

Permalink
automatically stop focus camera live when switching to other tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
Alpaca233 committed Feb 26, 2025
1 parent bfba66d commit 95dd88a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions software/control/gui_hcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1269,6 +1269,11 @@ def onDisplayTabChanged(self, index):
if hasattr(current_widget, "viewer"):
current_widget.activate()

# Stop focus camera live if not on laser focus tab
if SUPPORT_LASER_AUTOFOCUS:
if self.imageDisplayTabs.tabText(index) != "Laser-Based Focus":
self.laserAutofocusSettingWidget.stop_live()

def onWellplateChanged(self, format_):
if isinstance(format_, QVariant):
format_ = format_.value()
Expand Down
5 changes: 5 additions & 0 deletions software/control/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,11 @@ def toggle_live(self, pressed):
self.liveController.stop_live()
self.btn_live.setText("Start Live")
self.run_spot_detection_button.setEnabled(True)

def stop_live(self):
"""Used for stopping live when switching to other tabs"""
self.toggle_live(False)
self.btn_live.setChecked(False)

def toggle_characterization_mode(self, state):
self.laserAutofocusController.characterization_mode = state
Expand Down

0 comments on commit 95dd88a

Please sign in to comment.