Changeset 3477478 in sasview for src/sas/plottools/toolbar.py


Ignore:
Timestamp:
Mar 5, 2015 12:38:29 PM (9 years ago)
Author:
Mathieu Doucet <doucetm@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
b9dbd6b
Parents:
2df0b74
Message:

pylint fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/plottools/toolbar.py

    r79492222 r3477478  
    99# Event binding code changed after version 2.5 
    1010if wx.VERSION_STRING >= '2.5': 
    11     def bind(actor,event,action,**kw): 
    12         actor.Bind(event,action,**kw) 
     11    def bind(actor, event, action, **kw): 
     12        actor.Bind(event, action, **kw) 
    1313else: 
    14     def bind(actor,event,action,id=None): 
     14    def bind(actor, event, action, id=None): 
    1515        if id is not None: 
    1616            event(actor, id, action) 
    1717        else: 
    18             event(actor,action) 
     18            event(actor, action) 
    1919 
    2020class NavigationToolBar(NavigationToolbar2WxAgg): 
     
    2828    try: save_figure = NavigationToolbar2WxAgg.save 
    2929    except AttributeError: pass 
     30     
    3031    def _init_toolbar(self): 
    3132        self._parent = self.canvas.GetParent() 
    32         _NTB2_HOME         = wx.NewId() 
    33         self._NTB2_BACK    = wx.NewId() 
     33        _NTB2_HOME = wx.NewId() 
     34        self._NTB2_BACK = wx.NewId() 
    3435        self._NTB2_FORWARD = wx.NewId() 
    35         self._NTB2_PAN     = wx.NewId() 
    36         self._NTB2_ZOOM    = wx.NewId() 
    37         _NTB2_SAVE         = wx.NewId() 
    38         _NTB2_PRINT        = wx.NewId() 
    39         _NTB2_RESET        = wx.NewId() 
     36        self._NTB2_PAN = wx.NewId() 
     37        self._NTB2_ZOOM = wx.NewId() 
     38        _NTB2_SAVE = wx.NewId() 
     39        _NTB2_PRINT = wx.NewId() 
     40        _NTB2_RESET = wx.NewId() 
    4041 
    4142        # for mpl 1.2+ compatibility 
     
    4647        self.wx_ids['Zoom'] = self._NTB2_ZOOM 
    4748 
    48         self.SetToolBitmapSize(wx.Size(24,24)) 
     49        self.SetToolBitmapSize(wx.Size(24, 24)) 
    4950 
    5051        context_tip = 'Graph Menu: \n' 
     
    5556 
    5657        self.InsertSeparator(1) 
    57          
     58 
    5859        self.AddSimpleTool(self._NTB2_BACK, _load_bitmap('back.png'), 
    5960                           'Back', 'Back navigation view') 
     
    6263        # todo: get new bitmap 
    6364        self.AddCheckTool(self._NTB2_PAN, _load_bitmap('move.png'), 
    64                            shortHelp='Pan', 
    65                            longHelp='Pan with left, zoom with right') 
     65                          shortHelp='Pan', 
     66                          longHelp='Pan with left, zoom with right') 
    6667        self.AddCheckTool(self._NTB2_ZOOM, _load_bitmap('zoom_to_rect.png'), 
    67                            shortHelp='Zoom', longHelp='Zoom to rectangle') 
     68                          shortHelp='Zoom', longHelp='Zoom to rectangle') 
    6869 
    6970        self.AddSeparator() 
    7071        self.AddSimpleTool(_NTB2_SAVE, _load_bitmap('filesave.png'), 
    7172                           'Save', 'Save plot contents to file') 
    72          
     73 
    7374        print_bmp = wx.ArtProvider.GetBitmap(wx.ART_PRINT, wx.ART_TOOLBAR) 
    7475        self.AddSimpleTool(_NTB2_PRINT, print_bmp, 'Print', 'Print plot') 
    75          
     76 
    7677        reset_bmp = wx.ArtProvider.GetBitmap(wx.ART_GO_HOME, wx.ART_TOOLBAR) 
    7778        self.AddSimpleTool(_NTB2_RESET, reset_bmp, 'Reset', 'Reset graph range') 
     
    114115        except: 
    115116            logging.error("Plot toolbar could not print") 
    116          
Note: See TracChangeset for help on using the changeset viewer.