diff --git a/plugin/napari_lattice/shape_selector.py b/plugin/napari_lattice/shape_selector.py index d0b62c20..3a1a5a05 100644 --- a/plugin/napari_lattice/shape_selector.py +++ b/plugin/napari_lattice/shape_selector.py @@ -145,7 +145,7 @@ def _widget_changed(self, values: list) -> None: with self._block() as execute: if not execute: return - layers: dict[Shapes, list[int]] = {layer: [] for layer in get_viewer().layers if isinstance(layer, Shapes)} + layers: dict[Shapes, list[int]] = {layer: [] for layer in viewer.layers if isinstance(layer, Shapes)} value: Shape # Find the current selection for each layer