Changeset a9279cc in sasview for src/sas/sasgui/perspectives/fitting


Ignore:
Timestamp:
Nov 30, 2016 7:33:01 AM (8 years ago)
Author:
wojciech
Children:
6a569b3
Parents:
4638f1d
Message:

Code cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/fitting/gpu_options.py

    r4638f1d ra9279cc  
    4949        boxsizer = wx.BoxSizer(orient=wx.VERTICAL) 
    5050        self.option_button = {} 
    51         for index, fitter in enumerate(clinfo): 
     51        for index, clopt in enumerate(clinfo): 
    5252            button = wx.RadioButton(self.panel1, -1, 
    53                     label=fitter, name=fitter) 
    54             if fitter != "No OpenCL": 
    55                 self.option_button[fitter] = str(index) 
     53                    label=clopt, name=clopt) 
     54            if clopt != "No OpenCL": 
     55                self.option_button[clopt] = str(index) 
    5656            else: 
    57                 self.option_button[fitter] = "None" 
     57                self.option_button[clopt] = "None" 
    5858            self.Bind(wx.EVT_RADIOBUTTON, self.OnRadio, id=button.GetId()) 
    5959            boxsizer.Add(button, 0, 0) 
     
    6868 
    6969        accept_btn = wx.Button(self, wx.ID_OK) 
    70         accept_btn.SetToolTipString("Accept new options for GPU") 
     70        accept_btn.SetToolTipString("Accept OpenCL settings") 
    7171 
    7272        help_btn = wx.Button(self, wx.ID_HELP, 'Help') 
     
    7474 
    7575        self.Bind(wx.EVT_BUTTON, self.OnAccept, accept_btn) 
    76         if help is not None: 
    77             self.Bind(wx.EVT_BUTTON, self.OnHelp, help_btn) 
    78  
     76        self.Bind(wx.EVT_BUTTON, self.OnHelp, help_btn) 
    7977        self.Bind(wx.EVT_CLOSE, self.OnClose) 
    8078 
     
    113111        os.environ["SAS_OPENCL"] = self.option_button[button.Name] 
    114112        sasmodels.kernelcl.ENV = None 
     113        #Need to reload sasmodels.core module to account SAS_OPENCL = "None" 
    115114        reload(sasmodels.core) 
    116115 
Note: See TracChangeset for help on using the changeset viewer.