From 3e47b5280d1dd4b59e5ebaff459fe8b69697db2c Mon Sep 17 00:00:00 2001 From: Clayton Smith Date: Sun, 1 Oct 2023 12:49:09 -0400 Subject: [PATCH] Invalidate max, min, & hist before updateOverlay & redraw --- src/qtgui/plotter.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/qtgui/plotter.cpp b/src/qtgui/plotter.cpp index 1dba888d1..b5d17ae7a 100644 --- a/src/qtgui/plotter.cpp +++ b/src/qtgui/plotter.cpp @@ -870,15 +870,16 @@ void CPlotter::zoomStepX(float step, int x) // before frequency limits can be checked in setFftCenterFreq(). m_Span = new_span; setFftCenterFreq(qRound64((f_max + f_min) / 2.0f)); + + m_MaxHoldValid = false; + m_MinHoldValid = false; + m_histIIRValid = false; + updateOverlay(); double zoom = (double)m_SampleFreq / (double)m_Span; emit newZoomLevel(zoom); qCDebug(plotter) << QString("Spectrum zoom: %1x").arg(zoom, 0, 'f', 1); - - m_MaxHoldValid = false; - m_MinHoldValid = false; - m_histIIRValid = false; } // Zoom on X axis (absolute level)