From 11d8b1773357e8ec0a713d3bd616bf4671c64507 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Mon, 1 Dec 2014 21:38:48 +0000 Subject: [PATCH] Correct the placement of vertical grid lines when start freq is nonzero. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@4717 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- plotter.cpp | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/plotter.cpp b/plotter.cpp index dadf99adb..06c1c8608 100644 --- a/plotter.cpp +++ b/plotter.cpp @@ -195,24 +195,25 @@ void CPlotter::DrawOverlay() //DrawOverlay() pixperdiv = m_freqPerDiv/df; y = m_h2 - m_h2/VERT_DIVS; - m_hdivs = w*df/m_freqPerDiv + 0.9999; - for( int i=1; i= 0 and x<=m_w) { - painter.setPen(QPen(Qt::white, 1,Qt::DotLine)); - painter.drawLine(x, 0, x , y); - painter.drawLine(x, m_h2-5, x , m_h2); - } + m_hdivs = w*df/m_freqPerDiv + 1.9999; + float xx0=float(m_startFreq)/float(m_freqPerDiv); + xx0=xx0-int(xx0); + int x0=xx0*pixperdiv+0.5; + for( int i=1; i= 0 and x<=m_w) { + painter.setPen(QPen(Qt::white, 1,Qt::DotLine)); + painter.drawLine(x, 0, x , y); + painter.drawLine(x, m_h2-5, x , m_h2); } + } pixperdiv = (float)m_h2 / (float)VERT_DIVS; painter.setPen(QPen(Qt::white, 1,Qt::DotLine)); - for( int i=1; i