Skip to content

Commit

Permalink
Merge pull request #1247 from willcode/fix/plotter-redraw-after-z
Browse files Browse the repository at this point in the history
plotter: more responsive overlay redraws
  • Loading branch information
argilo authored Jun 18, 2023
2 parents 405aad6 + 6425276 commit 21a3432
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
8 changes: 2 additions & 6 deletions src/qtgui/plotter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1136,8 +1136,7 @@ void CPlotter::resizeEvent(QResizeEvent* )
m_CursorCaptureDelta = qRound((qreal)CUR_CUT_DELTA * m_DPR);
}

drawOverlay();
draw(false);
updateOverlay();
emit newSize();
}

Expand Down Expand Up @@ -2437,10 +2436,7 @@ void CPlotter::setCenterFreq(quint64 f)
void CPlotter::updateOverlay()
{
m_DrawOverlay = true;
if (!m_Running)
{
draw(false);
}
draw(false);
}

/** Reset horizontal zoom to 100% and centered around 0. */
Expand Down
8 changes: 4 additions & 4 deletions src/qtgui/plotter.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class CPlotter : public QFrame
void setFilterOffset(qint64 freq_hz)
{
m_DemodCenterFreq = m_CenterFreq + freq_hz;
drawOverlay();
updateOverlay();
}
qint64 getFilterOffset() const
{
Expand All @@ -71,7 +71,7 @@ class CPlotter : public QFrame
{
m_DemodLowCutFreq = LowCut;
m_DemodHiCutFreq = HiCut;
drawOverlay();
updateOverlay();
}

void getHiLowCutFrequencies(int *LowCut, int *HiCut) const
Expand All @@ -89,7 +89,7 @@ class CPlotter : public QFrame
m_Span = (qint32)s;
setFftCenterFreq(m_FftCenter);
}
drawOverlay();
updateOverlay();
}

void setVdivDelta(int delta) { m_VdivDelta = delta; }
Expand All @@ -102,7 +102,7 @@ class CPlotter : public QFrame
if (rate > 0.0f)
{
m_SampleFreq = rate;
drawOverlay();
updateOverlay();
}
}

Expand Down

0 comments on commit 21a3432

Please sign in to comment.