1
0
forked from IPKM/nmreval

fit creation dialog uses option name for kwargs

This commit is contained in:
Dominik Demuth 2023-08-05 17:53:24 +02:00
parent ec8fafcc9c
commit 2fed4bb0bf

View File

@ -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}')