@@ -1350,6 +1350,8 @@ def _load_bitmap(filename):
13501350
13511351
13521352_FRAME_ICON = None
1353+
1354+
13531355def _set_frame_icon (frame ):
13541356 # set frame icon
13551357 global _FRAME_ICON
@@ -1358,9 +1360,11 @@ def _set_frame_icon(frame):
13581360 for image in ('matplotlib.png' , 'matplotlib_large.png' ):
13591361 image = os .path .join (matplotlib .rcParams ['datapath' ], 'images' ,
13601362 image )
1361- if not os .path .exists (image ): continue
1363+ if not os .path .exists (image ):
1364+ continue
13621365 icon = wx .Icon (_load_bitmap (image ))
1363- if not icon .IsOk (): return
1366+ if not icon .IsOk ():
1367+ return
13641368 bundle .AddIcon (icon )
13651369 frame .SetIcons (_FRAME_ICON )
13661370
@@ -1748,7 +1752,7 @@ def add_toolitem(
17481752 tool = self .InsertTool (idx , - 1 , name , bmp , wx .NullBitmap , kind ,
17491753 description or "" )
17501754 else :
1751- size = (self .GetTextExtent (name )[0 ]+ 10 ,- 1 )
1755+ size = (self .GetTextExtent (name )[0 ]+ 10 , - 1 )
17521756 if toggle :
17531757 control = wx .ToggleButton (self , - 1 , name , size = size )
17541758 else :
@@ -1787,6 +1791,7 @@ def toggle_toolitem(self, name, toggled):
17871791 else :
17881792 tool .GetControl ().SetValue (toggled )
17891793 self .Refresh ()
1794+
17901795 def remove_toolitem (self , name ):
17911796 for tool , handler in self ._toolitems [name ]:
17921797 self .DeleteTool (tool .Id )
0 commit comments