Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/pymmcore_widgets/_deprecated/_device_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ def __init__(
self._combo.currentIndexChanged.connect(self._on_combo_changed)
self._changing = False
self._refresh_choices()
self._combo.setCurrentText(self._mmc.getStateLabel(self._device_label))
with signals_blocked(self._combo):
self._combo.setCurrentText(self._mmc.getStateLabel(self._device_label))

self.setLayout(QHBoxLayout())
self.layout().setContentsMargins(0, 0, 0, 0)
Expand Down
13 changes: 7 additions & 6 deletions src/pymmcore_widgets/control/_stage_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,12 +375,13 @@ def _on_system_cfg(self) -> None:
self._set_as_default()

def _set_as_default(self) -> None:
if self._dtype is DeviceType.XYStage:
if self._mmc.getXYStageDevice() == self._device:
self._set_as_default_btn.setChecked(True)
elif self._dtype is DeviceType.Stage:
if self._mmc.getFocusDevice() == self._device:
self._set_as_default_btn.setChecked(True)
with signals_blocked(self._set_as_default_btn):
if self._dtype is DeviceType.XYStage:
if self._mmc.getXYStageDevice() == self._device:
self._set_as_default_btn.setChecked(True)
elif self._dtype is DeviceType.Stage:
if self._mmc.getFocusDevice() == self._device:
self._set_as_default_btn.setChecked(True)

@Slot(bool)
def _on_radiobutton_toggled(self, state: bool) -> None:
Expand Down
Loading