Thanks to visit codestin.com Credit goes to github.com
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 5f852e4 + 921ae06 commit 05b4e4cCopy full SHA for 05b4e4c
1 file changed
lib/matplotlib/backends/backend_gtk.py
@@ -547,14 +547,14 @@ def notify_axes_change(fig):
547
548
def destroy(self, *args):
549
if _debug: print 'FigureManagerGTK.%s' % fn_name()
550
+ if hasattr(self, 'toolbar') and self.toolbar is not None:
551
+ self.toolbar.destroy()
552
if hasattr(self, 'vbox'):
553
self.vbox.destroy()
554
if hasattr(self, 'window'):
555
self.window.destroy()
556
if hasattr(self, 'canvas'):
557
self.canvas.destroy()
- if hasattr(self, 'toolbar'):
- self.toolbar.destroy()
558
self.__dict__.clear() #Is this needed? Other backends don't have it.
559
560
if Gcf.get_num_fig_managers()==0 and \
0 commit comments