@@ -1350,6 +1350,8 @@ def _load_bitmap(filename):
1350
1350
1351
1351
1352
1352
_FRAME_ICON = None
1353
+
1354
+
1353
1355
def _set_frame_icon (frame ):
1354
1356
# set frame icon
1355
1357
global _FRAME_ICON
@@ -1358,9 +1360,11 @@ def _set_frame_icon(frame):
1358
1360
for image in ('matplotlib.png' , 'matplotlib_large.png' ):
1359
1361
image = os .path .join (matplotlib .rcParams ['datapath' ], 'images' ,
1360
1362
image )
1361
- if not os .path .exists (image ): continue
1363
+ if not os .path .exists (image ):
1364
+ continue
1362
1365
icon = wx .Icon (_load_bitmap (image ))
1363
- if not icon .IsOk (): return
1366
+ if not icon .IsOk ():
1367
+ return
1364
1368
bundle .AddIcon (icon )
1365
1369
frame .SetIcons (_FRAME_ICON )
1366
1370
@@ -1748,7 +1752,7 @@ def add_toolitem(
1748
1752
tool = self .InsertTool (idx , - 1 , name , bmp , wx .NullBitmap , kind ,
1749
1753
description or "" )
1750
1754
else :
1751
- size = (self .GetTextExtent (name )[0 ]+ 10 ,- 1 )
1755
+ size = (self .GetTextExtent (name )[0 ]+ 10 , - 1 )
1752
1756
if toggle :
1753
1757
control = wx .ToggleButton (self , - 1 , name , size = size )
1754
1758
else :
@@ -1787,6 +1791,7 @@ def toggle_toolitem(self, name, toggled):
1787
1791
else :
1788
1792
tool .GetControl ().SetValue (toggled )
1789
1793
self .Refresh ()
1794
+
1790
1795
def remove_toolitem (self , name ):
1791
1796
for tool , handler in self ._toolitems [name ]:
1792
1797
self .DeleteTool (tool .Id )
0 commit comments