From 403273e0d739b83b0e876db245b087fcce08c2df Mon Sep 17 00:00:00 2001 From: Dominik Demuth Date: Wed, 27 Mar 2024 18:02:53 +0000 Subject: [PATCH] emit update of changed graph titles (#259); close #257 Co-authored-by: Dominik Demuth Reviewed-on: https://gitea.pkm.physik.tu-darmstadt.de/IPKM/nmreval/pulls/259 --- src/gui_qt/data/signaledit/phase_dialog.py | 12 ++++++------ src/gui_qt/main/management.py | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/gui_qt/data/signaledit/phase_dialog.py b/src/gui_qt/data/signaledit/phase_dialog.py index 601db39..d040312 100644 --- a/src/gui_qt/data/signaledit/phase_dialog.py +++ b/src/gui_qt/data/signaledit/phase_dialog.py @@ -413,12 +413,12 @@ class QPreviewDialog(QtWidgets.QDialog, Ui_ApodEdit): vb = self.time_graph.getPlotItem().getViewBox() vb.disableAutoRange(axis=vb.YAxis) - - self.zerofill_box.setVisible(self._all_time) - self.apod_box.setVisible(self._all_time) - self.shift_box.setVisible(self._all_time) - self.time_graph.setVisible(self._all_time) - self.logtime_widget.setVisible(self._all_time) + if self._all_time is not None: + self.zerofill_box.setVisible(self._all_time) + self.apod_box.setVisible(self._all_time) + self.shift_box.setVisible(self._all_time) + self.time_graph.setVisible(self._all_time) + self.logtime_widget.setVisible(self._all_time) self._temp_baseline = self._temp_baseline_time if self._all_time else self._temp_baseline_freq self._temp_fft = self._temp_fft_time if self._all_time else self._temp_fft_freq diff --git a/src/gui_qt/main/management.py b/src/gui_qt/main/management.py index a75cc2e..d334930 100644 --- a/src/gui_qt/main/management.py +++ b/src/gui_qt/main/management.py @@ -428,6 +428,7 @@ class UpperManagement(QtCore.QObject): self.graphs[d.graph].update_legend(identifier, name) elif identifier in self.graphs: self.graphs[identifier].title = name + self.graphs.valueChanged.emit() else: raise KeyError('Unknown ID ' + str(identifier))