PEAK: Cut-n-paste, works, amazing !

This commit is contained in:
vsonnier 2016-06-09 19:33:52 +02:00
parent 348b5404c3
commit 1e2f12a571
3 changed files with 9 additions and 0 deletions

View File

@ -1478,6 +1478,9 @@ void AppFrame::OnIdle(wxIdleEvent& event) {
int peakHoldMode = peakHoldButton->getSelection();
if (peakHoldButton->modeChanged()) {
wxGetApp().getSpectrumProcessor()->setPeakHold(peakHoldMode == 1);
//make the peak hold act on the current dmod also, like a zoomed-in version.
wxGetApp().getDemodSpectrumProcessor()->setPeakHold(peakHoldMode == 1);
peakHoldButton->clearModeChanged();
}

View File

@ -448,6 +448,9 @@ void CubicSDR::setFrequency(long long freq) {
frequency = freq;
sdrThread->setFrequency(freq);
getSpectrumProcessor()->setPeakHold(getSpectrumProcessor()->getPeakHold());
//make the peak hold act on the current dmod also, like a zoomed-in version.
getDemodSpectrumProcessor()->setPeakHold(getSpectrumProcessor()->getPeakHold());
}
long long CubicSDR::getOffset() {

View File

@ -293,6 +293,9 @@ void SpectrumCanvas::OnMouseRightReleased(wxMouseEvent& event) {
if (!mouseTracker.getOriginDeltaMouseY()) {
resetScaleFactor = true;
wxGetApp().getSpectrumProcessor()->setPeakHold(wxGetApp().getSpectrumProcessor()->getPeakHold());
//make the peak hold act on the current dmod also, like a zoomed-in version.
wxGetApp().getDemodSpectrumProcessor()->setPeakHold(wxGetApp().getSpectrumProcessor()->getPeakHold());
}
mouseTracker.OnMouseRightReleased(event);
}