Changeset 2109350 in sasview for src/sas/qtgui/Perspectives/Fitting/MultiConstraint.py
- Timestamp:
- Jan 9, 2018 3:44:55 AM (7 years ago)
- Branches:
- 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
- Children:
- a3c94b54
- Parents:
- 6b0c2f6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/MultiConstraint.py
r6b0c2f6 r2109350 36 36 switch M1 <-> M2 37 37 """ 38 # Switch parameters 38 39 self.params[1], self.params[0] = self.params[0], self.params[1] 40 # Try to swap parameter names in the line edit 41 current_text = self.txtConstraint.text() 42 new_text = current_text.replace(self.params[0], self.params[1]) 43 self.txtConstraint.setText(new_text) 44 # Update labels and tooltips 39 45 self.setupLabels() 40 46 self.setupTooltip() … … 88 94 # 2. ensure the text contains parameter name 89 95 parameter_string_start = constraint_text.find(param_str) 90 has_parameter_name = (parameter_string_start > -1) 91 if not has_parameter_name: 96 if parameter_string_start < 0: 92 97 return False 93 98 parameter_string_end = parameter_string_start + len(param_str) 94 99 95 # 3. parameter name should be a separate word, but can have "()[]*+-/ " around100 # 3. parameter name should be a separate word, but can have "()[]*+-/ " around 96 101 valid_neighbours = "()[]*+-/ " 97 102 has_only_parameter = False
Note: See TracChangeset
for help on using the changeset viewer.