Skip to content

Commit 081d4b6

Browse files
committed
Cleanups to base.py
1 parent 727ccb5 commit 081d4b6

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/napari_matplotlib/base.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,9 @@ def draw(self) -> None:
125125
"""
126126

127127
def _on_update_layers(self) -> None:
128-
"""This function is called when self.layers is updated via self.update_layers()
128+
"""
129+
This function is called when self.layers is updated via
130+
``self.update_layers()``.
129131
130132
This is a no-op, and is intended for derived classes to override.
131133
"""
@@ -136,11 +138,13 @@ def _replace_toolbar_icons(self):
136138
text = action.text()
137139
if text == "Pan":
138140
action.setToolTip(
139-
"Pan/Zoom: Left button pans; Right button zooms; Click once to activate; Click again to deactivate"
141+
"Pan/Zoom: Left button pans; Right button zooms; "
142+
"Click once to activate; Click again to deactivate"
140143
)
141144
if text == "Zoom":
142145
action.setToolTip(
143-
"Zoom to rectangle; Click once to activate; Click again to deactivate"
146+
"Zoom to rectangle; Click once to activate; "
147+
"Click again to deactivate"
144148
)
145149
if len(text) > 0: # i.e. not a separator item
146150
icon_path = os.path.join(ICON_ROOT, text + ".png")
@@ -150,9 +154,6 @@ def _replace_toolbar_icons(self):
150154
class NapariNavigationToolbar(NavigationToolbar2QT):
151155
"""Custom Toolbar style for Napari."""
152156

153-
def __init__(self, canvas, parent):
154-
super().__init__(canvas, parent)
155-
156157
def _update_buttons_checked(self):
157158
"""Update toggle tool icons when selected/unselected."""
158159
super()._update_buttons_checked()

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy