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 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 """