Everything knows that SelectionWidget returns dict not values

This commit is contained in:
dominik 2022-03-23 15:51:09 +01:00
parent 22217f0544
commit ef81030213
2 changed files with 6 additions and 2 deletions

View File

@ -241,7 +241,7 @@ class QFitParameterWidget(QtWidgets.QWidget, Ui_FormFit):
else: else:
if p_i is None: if p_i is None:
kw_p[g.argname] = g.value kw_p.update(g.value)
else: else:
kw_p[g.argname] = p_i kw_p[g.argname] = p_i

View File

@ -59,8 +59,12 @@ class QCoupCalcDialog(QtWidgets.QDialog, Ui_coupling_calc_dialog):
def calc_coupling(self): def calc_coupling(self):
p = [] p = []
kw = {}
for pp in self._coupling_parameter: for pp in self._coupling_parameter:
p.append(pp.value) if isinstance(pp, FormWidget):
p.append(pp.value)
else:
kw.update(pp.value)
self.label.setText('Coupling constant: %.8g' % self.cp[self.comboBox.currentIndex()].relax(*p)) self.label.setText('Coupling constant: %.8g' % self.cp[self.comboBox.currentIndex()].relax(*p))