Changeset baeac95 in sasview for src/sas/qtgui/Perspectives/Fitting/MultiConstraint.py
- Timestamp:
- Nov 14, 2018 5:43:28 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:
- ecc5d043
- Parents:
- e5ae812
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/MultiConstraint.py
r305114c rbaeac95 20 20 Logic class for interacting with MultiConstrainedUI view 21 21 """ 22 def __init__(self, parent=None, params=None ):22 def __init__(self, parent=None, params=None, constraint=None): 23 23 """ 24 24 parent: ConstraintWidget object … … 31 31 self.params = params 32 32 self.parent = parent 33 self.function = None 34 35 self.input_constraint = constraint 36 if self.input_constraint is not None: 37 variable = constraint.value 38 #variable = func[func.index('.')+1:] 39 self.function = constraint.func 40 self.params.append(variable) 41 self.model_name = constraint.value_ex 42 else: 43 self.model_name = self.params[1] 33 44 34 45 self.setupLabels() … … 36 47 37 48 # Set param text control to the second parameter passed 38 self.txtConstraint.setText(self.params[1]) 39 49 if self.input_constraint is None: 50 self.txtConstraint.setText(self.params[1]) 51 else: 52 self.txtConstraint.setText(self.function) 40 53 self.cmdOK.clicked.connect(self.accept) 41 54 self.cmdHelp.clicked.connect(self.onHelp) … … 52 65 # Switch parameters 53 66 self.params[1], self.params[0] = self.params[0], self.params[1] 67 # change fully qualified param name (e.g. M1.sld -> M1.sld_solvent) 68 self.model_name = self.model_name.replace(self.params[0], self.params[1]) 54 69 # Try to swap parameter names in the line edit 55 70 current_text = self.txtConstraint.text() … … 64 79 Setup labels based on current parameters 65 80 """ 66 l1 = s elf.params[0]67 l2 = s elf.params[1]81 l1 = str(self.params[0]) 82 l2 = str(self.params[1]) 68 83 self.txtParam1.setText(l1) 69 84 self.txtParam1_2.setText(l1) … … 99 114 return False 100 115 101 param_str = str(self.params[1]) 102 constraint_text = constraint_text.strip() 116 param_str = self.model_name 103 117 104 118 # 1. just the parameter
Note: See TracChangeset
for help on using the changeset viewer.