File tree 1 file changed +10
-16
lines changed
1 file changed +10
-16
lines changed Original file line number Diff line number Diff line change @@ -1360,24 +1360,18 @@ def _load_bitmap(filename):
1360
1360
return bmp
1361
1361
1362
1362
1363
- _FRAME_ICON = None
1364
-
1365
-
1366
1363
def _set_frame_icon (frame ):
1367
1364
# set frame icon
1368
- global _FRAME_ICON
1369
- if not _FRAME_ICON :
1370
- _FRAME_ICON = bundle = wx .IconBundle ()
1371
- for image in ('matplotlib.png' , 'matplotlib_large.png' ):
1372
- image = os .path .join (matplotlib .rcParams ['datapath' ], 'images' ,
1373
- image )
1374
- if not os .path .exists (image ):
1375
- continue
1376
- icon = wx .Icon (_load_bitmap (image ))
1377
- if not icon .IsOk ():
1378
- return
1379
- bundle .AddIcon (icon )
1380
- frame .SetIcons (_FRAME_ICON )
1365
+ bundle = wx .IconBundle ()
1366
+ for image in ('matplotlib.png' , 'matplotlib_large.png' ):
1367
+ image = os .path .join (matplotlib .rcParams ['datapath' ], 'images' , image )
1368
+ if not os .path .exists (image ):
1369
+ continue
1370
+ icon = wx .Icon (_load_bitmap (image ))
1371
+ if not icon .IsOk ():
1372
+ return
1373
+ bundle .AddIcon (icon )
1374
+ frame .SetIcons (bundle )
1381
1375
1382
1376
1383
1377
class MenuButtonWx (wx .Button ):
You can’t perform that action at this time.
0 commit comments