@@ -1271,8 +1271,12 @@ def __init__(self, num, fig):
1271
1271
self .toolbar .Realize ()
1272
1272
# On Windows platform, default window size is incorrect, so set
1273
1273
# toolbar width to figure width.
1274
- tw , th = self .toolbar .GetSizeTuple ()
1275
- fw , fh = self .canvas .GetSizeTuple ()
1274
+ if wxc .is_phoenix :
1275
+ tw , th = self .toolbar .GetSize ()
1276
+ fw , fh = self .canvas .GetSize ()
1277
+ else :
1278
+ tw , th = self .toolbar .GetSizeTuple ()
1279
+ fw , fh = self .canvas .GetSizeTuple ()
1276
1280
# By adding toolbar in sizer, we are able to put it at the bottom
1277
1281
# of the frame - so appearance is closer to GTK version.
1278
1282
self .toolbar .SetSize (wx .Size (fw , th ))
@@ -1370,9 +1374,10 @@ def show(self):
1370
1374
def destroy (self , * args ):
1371
1375
DEBUG_MSG ("destroy()" , 1 , self )
1372
1376
self .frame .Destroy ()
1373
- #if self.tb is not None: self.tb.Destroy()
1374
- # wx.GetApp().ProcessIdle()
1375
- wx .WakeUpIdle ()
1377
+ wxapp = wx .GetApp ()
1378
+ if wxapp :
1379
+ wxapp .Yield ()
1380
+
1376
1381
1377
1382
def get_window_title (self ):
1378
1383
return self .window .GetTitle ()
0 commit comments