From 2fed4bb0bf3056cd71267a62dd1ad6dd0a40e4d9 Mon Sep 17 00:00:00 2001 From: Dominik Demuth Date: Sat, 5 Aug 2023 17:53:24 +0200 Subject: [PATCH] fit creation dialog uses option name for kwargs --- src/gui_qt/fit/function_creation_dialog.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui_qt/fit/function_creation_dialog.py b/src/gui_qt/fit/function_creation_dialog.py index b63ee29..4c104bd 100644 --- a/src/gui_qt/fit/function_creation_dialog.py +++ b/src/gui_qt/fit/function_creation_dialog.py @@ -209,7 +209,7 @@ class KwargsWidget(QtWidgets.QWidget): def get_strings(self) -> str: kwargs = [] if self.use_nuclei.isChecked(): - kwargs.append("(r'\gamma', 'nucleus', gamma)") + kwargs.append(r"(r'\gamma', 'nucleus', gamma)") for i in range(self.choices.count()): kwargs.append(self.choices.widget(i).get_strings()) @@ -300,7 +300,7 @@ class ChoiceWidget(QtWidgets.QWidget): def get_strings(self) -> str: opts = [] for i in range(self.table.rowCount()): - name = self.table.item(i, 0).text() + name = self.table.cellWidget(i, 0).text() val = self._make_value(i) opts.append(f'{name!r}: {val!r}')