From cbea2a07aaf06a8f8f4879ce462e7d6723f4e857 Mon Sep 17 00:00:00 2001 From: Grzegorz Bokota Date: Wed, 4 Feb 2026 00:29:28 +0100 Subject: [PATCH 1/2] fix: Fix `QtViewer` initialization as preparation for napari 0.7.0 --- package/PartSeg/common_gui/napari_image_view.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/package/PartSeg/common_gui/napari_image_view.py b/package/PartSeg/common_gui/napari_image_view.py index 9d1954117..95843f16f 100644 --- a/package/PartSeg/common_gui/napari_image_view.py +++ b/package/PartSeg/common_gui/napari_image_view.py @@ -936,7 +936,10 @@ def _bounding_box(self, num) -> Optional[tuple[np.ndarray, np.ndarray]]: class NapariQtViewer(QtViewer): def __init__(self, viewer): super().__init__(viewer, show_welcome_screen=False) - self.widget(0).layout().setContentsMargins(0, 5, 0, 2) + layout = self.widget(0).layout() + if layout is not None: + # Before napari 0.7.0 + layout.setContentsMargins(0, 5, 0, 2) def dragEnterEvent(self, event): # pylint: disable=no-self-use """ From 5915dab760d59d3876c1b5b8cfc2563428d164b0 Mon Sep 17 00:00:00 2001 From: Grzegorz Bokota Date: Wed, 4 Feb 2026 00:35:13 +0100 Subject: [PATCH 2/2] Add `QtViewer` to spellchecker --- .github/project_dict.pws | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/project_dict.pws b/.github/project_dict.pws index 110837d5d..93ebac445 100644 --- a/.github/project_dict.pws +++ b/.github/project_dict.pws @@ -1,4 +1,4 @@ -personal_ws-1.1 en 22 +personal_ws-1.1 en 29 napari autoupdate aspell @@ -27,3 +27,4 @@ cooldown otsu ome ImageJ +QtViewer