We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a5d9254 + bc7a993 commit 209abd8Copy full SHA for 209abd8
lib/matplotlib/backends/backend_tkagg.py
@@ -94,8 +94,10 @@ def _on_timer(self):
94
TimerBase._on_timer(self)
95
96
# Tk after() is only a single shot, so we need to add code here to
97
- # reset the timer if we're not operating in single shot mode.
98
- if not self._single and len(self.callbacks) > 0:
+ # reset the timer if we're not operating in single shot mode. However,
+ # if _timer is None, this means that _timer_stop has been called; so
99
+ # don't recreate the timer in that case.
100
+ if not self._single and self._timer:
101
self._timer = self.parent.after(self._interval, self._on_timer)
102
else:
103
self._timer = None
0 commit comments