mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-03-23 20:58:42 -04:00
Fixed channel marker.
This commit is contained in:
parent
3824642bff
commit
6062233dfa
@ -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);
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user