From f04cadf780d916f1398463f6a0e93b679cdc6ba1 Mon Sep 17 00:00:00 2001 From: Dominik Demuth Date: Mon, 13 Nov 2023 18:03:57 +0100 Subject: [PATCH] remember header settings in ascii dialog; fixes #140 --- src/gui_qt/io/asciireader.py | 3 +++ src/nmreval/fit/result.py | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui_qt/io/asciireader.py b/src/gui_qt/io/asciireader.py index a182693..b6e78de 100644 --- a/src/gui_qt/io/asciireader.py +++ b/src/gui_qt/io/asciireader.py @@ -62,6 +62,7 @@ class QAsciiReader(QtWidgets.QDialog, Ui_ascii_reader): self.log_checkBox.setChecked(False) self.set_gui() + self.set_column_names(1) self.skippy_checkbox.blockSignals(True) self.skippy_checkbox.setCheckState(QtCore.Qt.Unchecked) @@ -73,12 +74,14 @@ class QAsciiReader(QtWidgets.QDialog, Ui_ascii_reader): for text in self.reader.header: self.comment_textfield.appendPlainText(text) + tmp = self.line_spinBox.value() if self.reader.header: self.line_spinBox.setMaximum(len(self.reader.header)) else: self.line_spinBox.setValue(0) self.line_spinBox.setEnabled(False) self.show_preview(10) + self.line_spinBox.setValue(tmp) if self.reader.delays is not None: set_string = ''.join(str(d) + '\n' for d in self.reader.delays) diff --git a/src/nmreval/fit/result.py b/src/nmreval/fit/result.py index cd75ec0..b460ad8 100644 --- a/src/nmreval/fit/result.py +++ b/src/nmreval/fit/result.py @@ -171,9 +171,6 @@ class FitResult(Points): self._model_name = name self._func = func - # manually overwrite name to avoid '/' splits - self.name = name - @staticmethod def _prepare_names(parameter: dict, modelname: str): pattern = re.compile(r'(\\?\w[\\\w .-]*(?:_{[\w\\ .-]})?)(\(\d+\))')