Skip to content

Commit

Permalink
fix: disable Autofocus checkbox when using HCSWizard (#364)
Browse files Browse the repository at this point in the history
  • Loading branch information
fdrgsp authored Oct 4, 2024
1 parent 7b074d3 commit 2c7aa1a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/pymmcore_widgets/mda/_core_positions.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ def _set_position_table_editable(self, state: bool) -> None:
"""Enable/disable the position table depending on the use of the HCS wizard."""
self._edit_hcs_pos.setVisible(not state)
self.include_z.setVisible(state)
self.af_per_position.setVisible(state)

# Hide or show all columns that are irrelevant when using the HCS wizard
table = self.table()
Expand Down
6 changes: 3 additions & 3 deletions tests/test_useq_core_widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -770,10 +770,10 @@ def test_core_mda_with_hcs_enable_disable(
assert all(
not action.isEnabled() for action in wdg.stage_positions.toolBar().actions()[1:]
)
# include_z checkbox disablex
# include_z checkbox disabled
assert wdg.stage_positions.include_z.isHidden()
# autofocus checkbox enabled
assert wdg.stage_positions.af_per_position.isEnabled()
# autofocus checkbox disabled
assert wdg.stage_positions.af_per_position.isHidden()


@pytest.mark.parametrize("ext", ["json", "yaml"])
Expand Down

0 comments on commit 2c7aa1a

Please sign in to comment.