File tree 1 file changed +3
-1
lines changed 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -1215,6 +1215,7 @@ def _on_resize(self, event):
1215
1215
# we're paused. Reset the cache and re-init. Set up an event handler
1216
1216
# to catch once the draw has actually taken place.
1217
1217
self ._fig .canvas .mpl_disconnect (self ._resize_id )
1218
+ self ._was_stopped = self .event_source ._timer is None
1218
1219
self .event_source .stop ()
1219
1220
self ._blit_cache .clear ()
1220
1221
self ._init_draw ()
@@ -1225,7 +1226,8 @@ def _end_redraw(self, event):
1225
1226
# Now that the redraw has happened, do the post draw flushing and
1226
1227
# blit handling. Then re-enable all of the original events.
1227
1228
self ._post_draw (None , False )
1228
- self .event_source .start ()
1229
+ if not self ._was_stopped :
1230
+ self .event_source .start ()
1229
1231
self ._fig .canvas .mpl_disconnect (self ._resize_id )
1230
1232
self ._resize_id = self ._fig .canvas .mpl_connect ('resize_event' ,
1231
1233
self ._on_resize )
You can’t perform that action at this time.
0 commit comments