Fixed channel marker.

This commit is contained in:
Hexameron 2014-06-30 23:26:21 +01:00
parent 3824642bff
commit 6062233dfa
2 changed files with 5 additions and 3 deletions

View File

@ -145,7 +145,7 @@ USBDemodGUI::USBDemodGUI(PluginAPI* pluginAPI, QWidget* parent) :
m_channelMarker->setColor(Qt::blue);
m_channelMarker->setBandwidth(5000);
m_channelMarker->setCenterFrequency(2500);
m_channelMarker->setVisible(false);
m_channelMarker->setVisible(true);
connect(m_channelMarker, SIGNAL(changed()), this, SLOT(viewChanged()));
m_pluginAPI->addChannelMarker(m_channelMarker);

View File

@ -1183,7 +1183,8 @@ void GLSpectrum::mouseMoveEvent(QMouseEvent* event)
return;
} else if(m_cursorState == CSChannelMoving) {
Real freq = m_frequencyScale.getValueFromPos(event->x() - m_leftMarginPixmap.width() - 1) - m_centerFrequency;
m_channelMarkerStates[m_cursorChannel]->m_channelMarker->setCenterFrequency(freq);
if(m_channelMarkerStates[m_cursorChannel]->m_channelMarker->getColor()!=Qt::blue)
m_channelMarkerStates[m_cursorChannel]->m_channelMarker->setCenterFrequency(freq);
}
if(m_displayWaterfall || m_displayHistogram || m_displayMaxHold) {
@ -1226,7 +1227,8 @@ void GLSpectrum::mousePressEvent(QMouseEvent* event)
m_cursorState = CSChannelMoving;
m_cursorChannel = 0;
Real freq = m_frequencyScale.getValueFromPos(event->x() - m_leftMarginPixmap.width() - 1) - m_centerFrequency;
m_channelMarkerStates[m_cursorChannel]->m_channelMarker->setCenterFrequency(freq);
if(m_channelMarkerStates[m_cursorChannel]->m_channelMarker->getColor()!=Qt::blue)
m_channelMarkerStates[m_cursorChannel]->m_channelMarker->setCenterFrequency(freq);
return;
}
}