Skip to content

Commit

Permalink
plotter: prevent zooming gain out-of-bounds
Browse files Browse the repository at this point in the history
In some situations, it was possible to zoom in a way that causes the
minimum dB value in the plotter to become too low.
  • Loading branch information
sultanqasim committed Aug 11, 2023
1 parent 60bf96d commit 197fae6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/qtgui/plotter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1025,6 +1025,9 @@ void CPlotter::wheelEvent(QWheelEvent * event)
m_PandMaxdB = FFT_MAX_DB;

m_PandMindB = m_PandMaxdB - db_range;
if (m_PandMindB < FFT_MIN_DB)
m_PandMindB = FFT_MIN_DB;

m_MaxHoldValid = false;
m_MinHoldValid = false;
m_histIIRValid = false;
Expand Down

0 comments on commit 197fae6

Please sign in to comment.