Skip to content

Commit

Permalink
Update plotter.cpp
Browse files Browse the repository at this point in the history
Right Click on Audio FFT has no effect - resetting to zero centered FFT is in my opinion useless.

In the FFT window, the horizontal frequency numbers are now with a harder contrast ...
  • Loading branch information
ulrichloose committed Jan 11, 2021
1 parent b2916e4 commit 573a110
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/qtgui/plotter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ void CPlotter::mousePressEvent(QMouseEvent * event)
emit newDemodFreq(m_DemodCenterFreq, m_DemodCenterFreq - m_CenterFreq);
drawOverlay();
}
else if (event->buttons() == Qt::RightButton)
else if (event->buttons() == Qt::RightButton && m_CenterLineEnabled)
{
// reset frequency zoom
resetHorizontalZoom();
Expand All @@ -671,7 +671,7 @@ void CPlotter::mousePressEvent(QMouseEvent * event)
else if (m_CursorCaptured == XAXIS)
{
m_Xzero = pt.x();
if (event->buttons() == Qt::RightButton)
if (event->buttons() == Qt::RightButton && m_CenterLineEnabled)
{
// reset frequency zoom
resetHorizontalZoom();
Expand Down Expand Up @@ -1401,6 +1401,12 @@ void CPlotter::drawOverlay()

// draw frequency values (x axis)
makeFrequencyStrs();

if(m_CenterLineEnabled)
{
painter.fillRect(0, xAxisTop, w, h, QColor(0xff000000));
}

painter.setPen(QColor(PLOTTER_TEXT_COLOR));
for (int i = 0; i <= m_HorDivs; i++)
{
Expand Down

0 comments on commit 573a110

Please sign in to comment.