Changeset 9f3db13 in sasview for src/sas/qtgui/Calculators/SldPanel.py
- Timestamp:
- Mar 26, 2019 10:54:57 AM (6 years ago)
- Branches:
- ESS_GUI, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_opencl
- Children:
- 5123512
- Parents:
- 5d14851a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Calculators/SldPanel.py
r82efbe9 r9f3db13 1 1 # global 2 import numpy as np 2 3 import logging 3 4 from PyQt5 import QtCore … … 120 121 #self.ui.editMolecularFormula.setValidator(GuiUtils.FormulaValidator(self.ui.editMolecularFormula)) 121 122 123 # No need for recalculate 124 self.ui.recalculateButton.setVisible(False) 125 122 126 rx = QtCore.QRegExp("[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?") 123 127 self.ui.editMassDensity.setValidator(QtGui.QRegExpValidator(rx, self.ui.editMassDensity)) … … 143 147 self.model.setItem(key, QtGui.QStandardItem()) 144 148 145 self.model.dataChanged.connect(self.dataChanged)149 #self.model.dataChanged.connect(self.dataChanged) 146 150 147 151 self.ui.editMassDensity.textChanged.connect(self.recalculateSLD) … … 188 192 return ("%-5.3g" % value).strip() 189 193 190 if neutronWavelength :194 if neutronWavelength and float(neutronWavelength) > np.finfo(float).eps: 191 195 results = neutronSldAlgorithm(str(formula), float(density), float(neutronWavelength)) 192 196 … … 214 218 self.ui.editNeutronAbsXs.setEnabled(False) 215 219 216 if xrayWavelength :220 if xrayWavelength and float(xrayWavelength) > np.finfo(float).eps: 217 221 results = xraySldAlgorithm(str(formula), float(density), float(xrayWavelength)) 218 222
Note: See TracChangeset
for help on using the changeset viewer.