Changeset 305114c in sasview for src/sas/qtgui/Perspectives/Fitting/ComplexConstraint.py
- Timestamp:
- Sep 14, 2018 10:10:09 AM (6 years ago)
- Branches:
- ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
- Children:
- aa88b76
- Parents:
- 86d3207
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/ComplexConstraint.py
raed0532 r305114c 13 13 import webbrowser 14 14 15 from sas.qtgui.Perspectives.Fitting import FittingUtilities 15 16 import sas.qtgui.Utilities.GuiUtils as GuiUtils 16 17 ALLOWED_OPERATORS = ['=','<','>','>=','<='] … … 32 33 self.operator = '=' 33 34 35 self.warning = self.lblWarning.text() 34 36 self.setupData() 37 self.setupSignals() 35 38 self.setupWidgets() 36 self.setupSignals()37 39 self.setupTooltip() 38 39 self.setFixedSize(self.minimumSizeHint())40 40 41 41 # Default focus is on OK … … 101 101 # Find out the signal source 102 102 source = self.sender().objectName() 103 param1 = self.cbParam1.currentText() 104 param2 = self.cbParam2.currentText() 103 105 if source == "cbParam1": 104 self.txtParam.setText(self.tab_names[0] + ":" + self.cbParam1.currentText())106 self.txtParam.setText(self.tab_names[0] + ":" + param1) 105 107 else: 106 self.txtConstraint.setText(self.tab_names[1] + "." + self.cbParam2.currentText()) 108 self.txtConstraint.setText(self.tab_names[1] + "." + param2) 109 # Check if any of the parameters are polydisperse 110 params_list = [param1, param2] 111 all_pars = [tab.model_parameters for tab in self.tabs] 112 is2Ds = [tab.is2D for tab in self.tabs] 113 txt = "" 114 for pars, is2D in zip(all_pars, is2Ds): 115 if any([FittingUtilities.isParamPolydisperse(p, pars, is2D) for p in params_list]): 116 # no parameters are pd - reset the text to not show the warning 117 txt = self.warning 118 self.lblWarning.setText(txt) 119 107 120 108 121 def onOperatorChange(self, index):
Note: See TracChangeset
for help on using the changeset viewer.