Changeset ecc5d043 in sasview for src/sas/qtgui/Perspectives/Fitting/FittingWidget.py
- Timestamp:
- Nov 16, 2018 3:05:20 AM (5 years ago)
- Branches:
- ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
- Children:
- 09e0c32
- Parents:
- baeac95
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/FittingWidget.py
rbaeac95 recc5d043 903 903 except AttributeError: 904 904 return None 905 906 def allParamNames(self): 907 """ 908 Returns a list of all parameter names defined on the current model 909 """ 910 all_params = self.kernel_module._model_info.parameters.kernel_parameters 911 all_param_names = [param.name for param in all_params] 912 # Assure scale and background are always included 913 if 'scale' not in all_param_names: 914 all_param_names.append('scale') 915 if 'background' not in all_param_names: 916 all_param_names.append('background') 917 return all_param_names 918 919 def paramHasConstraint(self, param=None): 920 """ 921 Finds out if the given parameter in the main model has a constraint child 922 """ 923 if param is None: return False 924 if param not in self.allParamNames(): return False 925 926 for row in range(self._model_model.rowCount()): 927 if self._model_model.item(row,0).text() != param: continue 928 return self.rowHasConstraint(row) 929 930 # nothing found 931 return False 905 932 906 933 def rowHasConstraint(self, row):
Note: See TracChangeset
for help on using the changeset viewer.