Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
tlambert03 committed Jul 16, 2024
1 parent 14329d3 commit d5f5fcb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/pymmcore_widgets/_stage_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ def set_x_visible(self, visible: bool) -> None:
cols += [0, 6]

for c in cols:
if item := btn_layout.itemAtPosition(3, c):
item.widget().setVisible(visible)
if (item := btn_layout.itemAtPosition(3, c)) and (wdg := item.widget()):
wdg.setVisible(visible)

def _update_tooltips(self) -> None:
"""Update tooltips for the move buttons."""
Expand All @@ -177,6 +177,9 @@ class StageWidget(QWidget):
Stage device.
levels: int | None:
Number of "arrow" buttons per widget per direction, by default, 2.
position_labels_below: bool | None
If True, the position labels will appear below the move buttons.
If False, the position labels will appear to the right of the move buttons.
parent : QWidget | None
Optional parent widget.
mmcore : CMMCorePlus | None
Expand Down

0 comments on commit d5f5fcb

Please sign in to comment.