From ef81030213544c009a8e2ecab93d45ef0a46f772 Mon Sep 17 00:00:00 2001 From: dominik Date: Wed, 23 Mar 2022 15:51:09 +0100 Subject: [PATCH] Everything knows that SelectionWidget returns dict not values --- nmreval/gui_qt/fit/fit_parameter.py | 2 +- nmreval/gui_qt/nmr/coupling_calc.py | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/nmreval/gui_qt/fit/fit_parameter.py b/nmreval/gui_qt/fit/fit_parameter.py index 96ff18b..8bd125b 100644 --- a/nmreval/gui_qt/fit/fit_parameter.py +++ b/nmreval/gui_qt/fit/fit_parameter.py @@ -241,7 +241,7 @@ class QFitParameterWidget(QtWidgets.QWidget, Ui_FormFit): else: if p_i is None: - kw_p[g.argname] = g.value + kw_p.update(g.value) else: kw_p[g.argname] = p_i diff --git a/nmreval/gui_qt/nmr/coupling_calc.py b/nmreval/gui_qt/nmr/coupling_calc.py index b5bb877..2743efa 100644 --- a/nmreval/gui_qt/nmr/coupling_calc.py +++ b/nmreval/gui_qt/nmr/coupling_calc.py @@ -59,8 +59,12 @@ class QCoupCalcDialog(QtWidgets.QDialog, Ui_coupling_calc_dialog): def calc_coupling(self): p = [] + kw = {} 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))