From 8f1dc349914b91eb282e5dce3af1eb97fd2e208c Mon Sep 17 00:00:00 2001 From: Jens Ahrensfeld Date: Mon, 25 May 2026 21:57:23 +0200 Subject: [PATCH] Fix erratic axis scaling when hovering over plots InfiniteLine was included in auto-range calculations, causing the view to rescale on every cursor move. Add it with ignoreBounds=True in both the initial setup and after each redraw. Co-Authored-By: Claude Sonnet 4.6 --- gui_client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gui_client.py b/gui_client.py index 94fbe3f..ef51334 100644 --- a/gui_client.py +++ b/gui_client.py @@ -363,7 +363,7 @@ class PlotTab(QWidget): pen=pg.mkPen("gray", width=1, style=Qt.DashLine), ) vl.setVisible(False) - pw.addItem(vl) + pw.addItem(vl, ignoreBounds=True) self._vlines.append(vl) proxy = pg.SignalProxy( @@ -504,7 +504,7 @@ class PlotTab(QWidget): for i, pw in enumerate(self._plot_widgets): pi = pw.getPlotItem() pi.clear() - pi.addItem(self._vlines[i]) + pi.addItem(self._vlines[i], ignoreBounds=True) if pi.legend: pi.legend.clear()