Skip to content

Commit

Permalink
Merge pull request #1293 from gqrx-sdr/fix-invalidation-order
Browse files Browse the repository at this point in the history
Invalidate max, min, & hist before updateOverlay & redraw
  • Loading branch information
argilo committed Oct 1, 2023
2 parents 40bef4f + 3e47b52 commit a940070
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/qtgui/plotter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a940070

Please sign in to comment.