8000 Merge pull request #17200 from QuLogic/tk-history · matplotlib/matplotlib@5fed060 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5fed060

Browse files
authored
Merge pull request #17200 from QuLogic/tk-history
2 parents 015ff47 + 56504fa commit 5fed060

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lib/matplotlib/backends/_backend_tk.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -620,6 +620,16 @@ def save_figure(self, *args):
620620
except Exception as e:
621621
tkinter.messagebox.showerror("Error saving file", str(e))
622622

623+
def set_history_buttons(self):
624+
if self._nav_stack._pos > 0:
625+
self._buttons['Back']['state'] = tk.NORMAL
626+
else:
627+
self._buttons['Back']['state'] = tk.DISABLED
628+
if self._nav_stack._pos < len(self._nav_stack._elements) - 1:
629+
self._buttons['Forward']['state'] = tk.NORMAL
630+
else:
631+
self._buttons['Forward']['state'] = tk.DISABLED
632+
623633

624634
class ToolTip:
625635
"""

0 commit comments

Comments
 (0)
0