From 64b270d7c13f90560ae9e4628194bbd0b900c4f5 Mon Sep 17 00:00:00 2001 From: Dominik Demuth Date: Wed, 15 Nov 2023 20:16:17 +0100 Subject: [PATCH] remove enableAutoRange call to stop unwanted rescales; closes #143 --- src/gui_qt/graphs/graphwindow.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/gui_qt/graphs/graphwindow.py b/src/gui_qt/graphs/graphwindow.py index c4d7152..f25485d 100644 --- a/src/gui_qt/graphs/graphwindow.py +++ b/src/gui_qt/graphs/graphwindow.py @@ -167,7 +167,7 @@ class QGraphWindow(QtWidgets.QGraphicsView, Ui_GraphWindow): self._block = state if not self._block: - self.graphic.enableAutoRange() + # self.graphic.enableAutoRange() self._update_zorder() self.show_legend() else: @@ -178,6 +178,7 @@ class QGraphWindow(QtWidgets.QGraphicsView, Ui_GraphWindow): name = [name] plots = [plots] toplevel = len(self.sets) + self.listWidget.blockSignals(True) for (real_plot, imag_plot, err_plot), n in zip(plots, name): self.sets.append(n) @@ -463,8 +464,6 @@ class QGraphWindow(QtWidgets.QGraphicsView, Ui_GraphWindow): self.plotItem.updateLogMode() self.set_range(x=r[0], y=r[1]) - self.plotItem.enableAutoRange() - def enable_picking(self, enabled: bool): if enabled: self.scene.sigMouseClicked.connect(self.position_picked)