Changeset bacc04b in sasview for src/sas/sasgui/perspectives/fitting
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/gpu_options.py
rfbfed45 rbacc04b 35 35 boxsizer = wx.BoxSizer(orient=wx.VERTICAL) 36 36 self.option_button = {} 37 self.buttons = [] 37 38 for index, clopt in enumerate(clinfo): 38 button = wx.RadioButton(self.panel1, -1, label=clopt, name=clopt) 39 button.SetValue(0) 39 button = wx.CheckBox(self.panel1, -1, label=clopt, name=clopt) 40 40 if clopt != "No OpenCL": 41 41 self.option_button[clopt] = str(index) 42 42 else: 43 43 self.option_button[clopt] = "None" 44 self.Bind(wx.EVT_RADIOBUTTON, self.on_radio, id=button.GetId()) 44 self.Bind(wx.EVT_CHECKBOX, self.on_radio, id=button.GetId()) 45 self.buttons.append(button) 45 46 boxsizer.Add(button, 0, 0) 46 47 … … 100 101 :return: 101 102 """ 102 103 103 import sasmodels 104 button = event.GetEventObject() 105 os.environ["SAS_OPENCL"] = self.option_button[button.Name] 104 selected_button = event.GetEventObject() 105 for btn in self.buttons: 106 if btn != selected_button: 107 btn.SetValue(0) 108 os.environ["SAS_OPENCL"] = self.option_button[selected_button.Name] 106 109 sasmodels.kernelcl.ENV = None 107 110 #Need to reload sasmodels.core module to account SAS_OPENCL = "None"
Note: See TracChangeset
for help on using the changeset viewer.