8000 move wxapp creation to show() · matplotlib/matplotlib@9a0c184 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9a0c184

Browse files
committed
move wxapp creation to show()
svn path=/trunk/matplotlib/; revision=1076
1 parent 8d28b4f commit 9a0c184

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/matplotlib/backends/backend_wx.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@
113113
print >>sys.stderr, "Matplotlib backend_wx requires wxPython be installed"
114114
sys.exit()
115115

116-
wxapp = wxPySimpleApp()
117-
wxapp.SetExitOnFrameDelete(True)
116+
# wxapp = wxPySimpleApp()
117+
# wxapp.SetExitOnFrameDelete(True)
118118

119119

120120
#!!! this is the call that is causing the exception swallowing !!!
@@ -1156,6 +1156,8 @@ def show():
11561156
figwin.canvas.draw()
11571157

11581158
if show._needmain and not matplotlib.is_interactive():
1159+
wxapp = wx.PySimpleApp()
1160+
wxapp.SetExitOnFrameDelete(True)
11591161
wxapp.MainLoop()
11601162
show._needmain = False
11611163
show._needmain = True

0 commit comments

Comments
 (0)
0