@@ -972,7 +972,7 @@ def _onClose(self, event):
972972 self .canvas .close_event ()
973973 self .canvas .stop_event_loop ()
974974 # set FigureManagerWx.frame to None to prevent repeated attempts to
975- # close this frame from with the FigureManagerWx.destroy()
975+ # close this frame from FigureManagerWx.destroy()
976976 if self .figmgr is not None :
977977 self .figmgr .frame = None
978978 # remove figure manager from Gcf.figs
@@ -995,10 +995,8 @@ def Destroy(self, *args, **kwargs):
995995 # MPLBACKEND=wxagg python -c 'from pylab import *; plot()'.
996996 if self and not self .IsBeingDeleted ():
997997 super ().Destroy (* args , ** kwargs )
998- # This should not be necessary if the close event is allowed to
999- # propagate.
1000- #if self.toolbar is not None:
1001- # self.toolbar.Destroy()
998+ # self.toolbar.Destroy() should not be necessary if the close event
999+ # is allowed to propagate.
10021000 return True
10031001
10041002
@@ -1047,8 +1045,8 @@ def destroy(self, *args):
10471045 _log .debug ("%s - destroy()" , type (self ))
10481046 frame = self .frame
10491047 if frame : # Else, may have been already deleted, e.g. when closing.
1050- # as this can be called from non gui thread from plt.close use
1051- # wx.CallAfter to esnure thread safety.
1048+ # As this can be called from non-GUI thread from plt.close use
1049+ # wx.CallAfter to ensure thread safety.
10521050 wx .CallAfter (frame .Close )
10531051
10541052 def full_screen_toggle (self ):
0 commit comments