Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 48bd724

Browse files
author
Steve Chaplin
committed
'SC'
svn path=/trunk/matplotlib/; revision=2094
1 parent a02aa86 commit 48bd724

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

CHANGELOG

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2006-02-26 Update the previous gtk.main_quit() bug fix to use gtk.main_level()
2+
- SC
3+
14
2006-02-24 Implemented alpha support in contour and contourf - EF
25

36
2006-02-22 Fixed gtk main quit bug when quit was called before
@@ -15,7 +18,7 @@
1518

1619
2006-02-21 Fixed portrait/landscape orientation in postscript backend - DSD
1720

18-
2006-02-21 fix bug introduced in yesterday's bug fix - SC
21+
2006-02-21 Fix bug introduced in yesterday's bug fix - SC
1922

2023
2006-02-20 backend_gtk.py FigureCanvasGTK.draw(): fix bug reported by
2124
David Tremouilles - SC

lib/matplotlib/backends/backend_gtk.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@ def show(mainloop=True):
7777

7878
if mainloop and gtk.main_level() == 0:
7979
gtk.main()
80-
show._mainloop = True
81-
show._mainloop = False
8280

8381
def new_figure_manager(num, *args, **kwargs):
8482
"""
@@ -454,8 +452,10 @@ def destroy(self, *args):
454452
if _debug: print 'FigureManagerGTK.%s' % fn_name()
455453
self.window.destroy()
456454

457-
if Gcf.get_num_fig_managers()==0 and not matplotlib.is_interactive():
458-
if show._mainloop: gtk.main_quit()
455+
if Gcf.get_num_fig_managers()==0 and \
456+
not matplotlib.is_interactive() and \
457+
gtk.main_level() >= 1:
458+
gtk.main_quit()
459459

460460

461461
def full_screen_toggle (self):

0 commit comments

Comments
 (0)