From 4e2938b2a2eb881d10a115748b21711e9484c612 Mon Sep 17 00:00:00 2001 From: Dominik Demuth Date: Tue, 23 May 2023 06:40:08 +0000 Subject: [PATCH 1/2] proper handling of sets without label,; closes #73 --- src/gui_qt/io/gracereader.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/gui_qt/io/gracereader.py b/src/gui_qt/io/gracereader.py index 26b15ff..be3d62a 100644 --- a/src/gui_qt/io/gracereader.py +++ b/src/gui_qt/io/gracereader.py @@ -89,8 +89,11 @@ class QGraceReader(QtWidgets.QDialog, Ui_Dialog): item = iterator.value() key = (item.data(0, QtCore.Qt.UserRole)) s = self._reader.dataset(*key) - label = self._reader.get_property(*key, 'legend').replace('"', '') - # label = self._reader.graphs[key[0]].sets[key[1]]['legend'].replace('"', '') + label = self._reader.get_property(*key, 'legend') + if label is None: + label = '' + else: + label = label.replace('"', '') sd = s.data sd = np.atleast_2d(sd) if s.type == 'xydy': From 5590b5cd16121568c4e75da8f8c2a4bdeada0dfe Mon Sep 17 00:00:00 2001 From: Dominik Demuth Date: Wed, 24 May 2023 09:00:31 +0000 Subject: [PATCH 2/2] SelectionWidget has no function show_as_local_parameter; fixes #75 --- src/gui_qt/fit/fit_parameter.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gui_qt/fit/fit_parameter.py b/src/gui_qt/fit/fit_parameter.py index fb36072..682893e 100644 --- a/src/gui_qt/fit/fit_parameter.py +++ b/src/gui_qt/fit/fit_parameter.py @@ -181,7 +181,11 @@ class QFitParameterWidget(QtWidgets.QWidget, Ui_FormFit): for i, value in enumerate(self.data_values[sid]): w = self.data_parameter[i] w.blockSignals(True) - w.show_as_local_parameter(value is not None) + try: + w.show_as_local_parameter(value is not None) + except AttributeError: + pass + if value is None: w.value = self.glob_values[i] else: