Changeset 9d8d52c in sasview for src/sas/sasgui
- Timestamp:
- Jan 30, 2018 8:54:09 AM (7 years ago)
- Branches:
- master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 72670ad2
- Parents:
- b6f9c9f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/basepage.py
r58a8f76 r9d8d52c 1367 1367 except Exception: 1368 1368 logger.error(traceback.format_exc()) 1369 selection = self._find_polyfunc_selection(disp_model)1369 index, selection = self._find_polyfunc_selection(disp_model) 1370 1370 for list in self.fittable_param: 1371 1371 if list[1] == key and list[7] is not None: 1372 list[7].SetSelection( selection)1372 list[7].SetSelection(index) 1373 1373 # For the array disp_model, set the values and weights 1374 if selection == 1:1374 if selection == 'array': 1375 1375 disp_model.set_weights(self.values[key], 1376 1376 self.weights[key]) … … 1385 1385 logger.error(traceback.format_exc()) 1386 1386 # For array, disable all fixed params 1387 if selection == 1:1387 if selection == 'array': 1388 1388 for item in self.fixed_param: 1389 1389 if item[1].split(".")[0] == key.split(".")[0]: … … 2668 2668 def _find_polyfunc_selection(self, disp_func=None): 2669 2669 """ 2670 F Ind Comboox selection from disp_func2670 Find Combobox selection from disp_func 2671 2671 2672 2672 :param disp_function: dispersion distr. function … … 2675 2675 if disp_func is not None: 2676 2676 try: 2677 return POLYDISPERSITY_MODELS.values().index(disp_func.__class__) 2677 index = POLYDISPERSITY_MODELS.values().index(disp_func.__class__) 2678 return index, POLYDISPERSITY_MODELS.keys()[index] 2678 2679 except ValueError: 2679 2680 pass # Fall through to default class 2680 return POLYDISPERSITY_MODELS.keys().index('gaussian') 2681 return POLYDISPERSITY_MODELS.keys().index('gaussian'), 'gaussian' 2681 2682 2682 2683 def on_reset_clicked(self, event):
Note: See TracChangeset
for help on using the changeset viewer.