Skip to content

Commit 2bc64cb

Browse files
re-enable showing circles as points (#309)
* re-enable showing circles as points * fix pre-commit local ignore
1 parent 801c50e commit 2bc64cb

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/napari_spatialdata/_sdata_widgets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
and platform.machine() == "arm64"
3838
): # pragma: no cover
3939
try:
40-
PROBLEMATIC_NUMPY_MACOS = "cibw-run" in np.show_config("dicts")["Python Information"]["path"] # type: ignore[call-arg,func-returns-value]
40+
PROBLEMATIC_NUMPY_MACOS = "cibw-run" in np.show_config("dicts")["Python Information"]["path"] # type: ignore[call-arg,func-returns-value,unused-ignore]
4141
except (KeyError, TypeError):
4242
PROBLEMATIC_NUMPY_MACOS = False
4343
else:

src/napari_spatialdata/_viewer.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,9 @@ def get_sdata_circles(self, sdata: SpatialData, key: str, selected_cs: str, mult
534534
CIRCLES_AS_POINTS = True
535535
version = get_napari_version()
536536
kwargs: dict[str, Any] = (
537-
{"edge_width": 0.0} if version <= packaging.version.parse("0.4.20") else {"border_width": 0.0}
537+
{"edge_width": 0.0}
538+
if version <= packaging.version.parse("0.4.20") or not CIRCLES_AS_POINTS
539+
else {"border_width": 0.0}
538540
)
539541
if CIRCLES_AS_POINTS:
540542
layer = Points(
@@ -548,7 +550,7 @@ def get_sdata_circles(self, sdata: SpatialData, key: str, selected_cs: str, mult
548550
assert affine is not None
549551
self._adjust_radii_of_points_layer(layer=layer, affine=affine)
550552
else:
551-
if version <= packaging.version.parse("0.4.20"):
553+
if version <= packaging.version.parse("0.4.20") or not CIRCLES_AS_POINTS:
552554
kwargs |= {"edge_color": "white"}
553555
else:
554556
kwargs |= {"border_color": "white"}

0 commit comments

Comments
 (0)