8000 fixed bug where 2nd wxapp could be started · matplotlib/matplotlib@a8e9bf5 · GitHub
[go: up one dir, main page]

Skip to content

Commit a8e9bf5

Browse files
committed
fixed bug where 2nd wxapp could be started
svn path=/trunk/matplotlib/; revision=1373
1 parent 6a4d343 commit a8e9bf5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/matplotlib/backends/backend_wxagg.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,10 @@ def new_figure_manager(num, *args, **kwargs):
9090
DEBUG_MSG("new_figure_manager()", 3, None)
9191

9292
if backend_wx.wxapp is None:
93-
backend_wx.wxapp = wx.PySimpleApp()
94-
backend_wx.wxapp.SetExitOnFrameDelete(True)
93+
backend_wx.wxapp = wx.GetApp()
94+
if backend_wx.wxapp is None:
95+
backend_wx.wxapp = wx.PySimpleApp()
96+
backend_wx.wxapp.SetExitOnFrameDelete(True)
9597

9698
fig = Figure(*args, **kwargs)
9799
frame = FigureFrameWxAgg(num, fig)

0 commit comments

Comments
 (0)
0