Skip to content

Commit

Permalink
fix: setPlate
Browse files Browse the repository at this point in the history
  • Loading branch information
fdrgsp committed Aug 9, 2024
1 parent f3266a5 commit 11dbc94
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/pymmcore_widgets/hcs/_plate_navigator_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,8 +412,13 @@ def __init__(
self._plate_view.positionChanged.connect(self._on_position_changed)
self._preset_movements.toggled.connect(self._on_preset_movements_toggled)

def setPlate(self, plan: useq.WellPlate | useq.WellPlatePlan) -> None:
def setPlate(self, plan: useq.WellPlate | useq.WellPlatePlan | None) -> None:
"""Set the plate to be displayed."""
if plan is None:
self.clear()
self._plate_view._plan = None
return

Check warning on line 420 in src/pymmcore_widgets/hcs/_plate_navigator_widget.py

View check run for this annotation

Codecov / codecov/patch

src/pymmcore_widgets/hcs/_plate_navigator_widget.py#L418-L420

Added lines #L418 - L420 were not covered by tests

self._plate_view.drawPlate(plan)

def clear(self) -> None:
Expand Down

0 comments on commit 11dbc94

Please sign in to comment.