Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8106629

Browse files
committed
Don't override update() in NavigationToolbar2Tk.
... likely a remnant of the old NavigationToolbar1. - self._axes is not used anywhere. - the super().update clears the navstack and resets the history buttons, which shouldn't change the window focus (so the contextmanager does nothing) -- especially given that set_history_buttons isn't even implemented for the Tk toolbar.
1 parent f6b8891 commit 8106629

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

lib/matplotlib/backends/_backend_tk.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -624,11 +624,6 @@ def save_figure(self, *args):
624624
except Exception as e:
625625
tkinter.messagebox.showerror("Error saving file", str(e))
626626

627-
def update(self):
628-
self._axes = self.canvas.figure.axes
629-
with _restore_foreground_window_at_end():
630-
NavigationToolbar2.update(self)
631-
632627

633628
class ToolTip:
634629
"""

0 commit comments

Comments
 (0)