File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -398,7 +398,7 @@ class FigureManagerTk(FigureManagerBase):
398398 The tk.Window
399399 """
400400
401- # _owns_mainloop = False
401+ _owns_mainloop = False
402402
403403 def __init__ (self , canvas , num , window ):
404404 FigureManagerBase .__init__ (self , canvas , num )
@@ -462,7 +462,7 @@ def destroy(self, *args):
462462 self .canvas ._tkcanvas .after_cancel (self .canvas ._idle_callback )
463463 self .window .destroy ()
464464 if Gcf .get_num_fig_managers () == 0 :
465- if self .window is not None : # and self._owns_mainloop:
465+ if self .window is not None and self ._owns_mainloop :
466466 self .window .quit ()
467467 self .window = None
468468
@@ -885,6 +885,6 @@ def trigger_manager_draw(manager):
885885 def mainloop (cls ):
886886 managers = Gcf .get_all_fig_managers ()
887887 if managers :
888- # cls._owns_mainloop = True
888+ cls ._owns_mainloop = True
889889 managers [0 ].window .mainloop ()
890- # cls._owns_mainloop = False
890+ cls ._owns_mainloop = False
You can’t perform that action at this time.
0 commit comments