Skip to content

Commit 05b4e4c

Browse files
committed
Merge pull request matplotlib#388 from efiring/gtk_no_toolbar
Gtk no toolbar
2 parents 5f852e4 + 921ae06 commit 05b4e4c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/backends/backend_gtk.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -547,14 +547,14 @@ def notify_axes_change(fig):
547547

548548
def destroy(self, *args):
549549
if _debug: print 'FigureManagerGTK.%s' % fn_name()
550+
if hasattr(self, 'toolbar') and self.toolbar is not None:
551+
self.toolbar.destroy()
550552
if hasattr(self, 'vbox'):
551553
self.vbox.destroy()
552554
if hasattr(self, 'window'):
553555
self.window.destroy()
554556
if hasattr(self, 'canvas'):
555557
self.canvas.destroy()
556-
if hasattr(self, 'toolbar'):
557-
self.toolbar.destroy()
558558
self.__dict__.clear() #Is this needed? Other backends don't have it.
559559

560560
if Gcf.get_num_fig_managers()==0 and \

0 commit comments

Comments
 (0)