From fa54aab01f5932b522a2f028cde4ff1ea497d64e Mon Sep 17 00:00:00 2001 From: "Charles J. Cliffe" Date: Thu, 12 Mar 2015 20:50:40 -0400 Subject: [PATCH] fix for SSB selection issue --- src/visual/WaterfallCanvas.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/visual/WaterfallCanvas.cpp b/src/visual/WaterfallCanvas.cpp index 297d409..424041a 100644 --- a/src/visual/WaterfallCanvas.cpp +++ b/src/visual/WaterfallCanvas.cpp @@ -683,7 +683,12 @@ void WaterfallCanvas::OnMouseMoved(wxMouseEvent& event) { near_dist = dist; } - if (dist <= halfBw && dist >= (int) ((float) halfBw / (1.5 - (0.65 * (1.0-(float)(wxGetApp().getSampleRate() - getBandwidth())/(float)wxGetApp().getSampleRate()))))) { + + if (dist <= halfBw && dist >= (int)((float) halfBw / 1.5)) { + if ((freqDiff > 0 && activeDemodulator->getDemodulatorType() == DEMOD_TYPE_USB) || + (freqDiff < 0 && activeDemodulator->getDemodulatorType() == DEMOD_TYPE_LSB)) { + continue; + } long edge_dist = abs(halfBw - dist); if (edge_dist < near_dist) { activeDemodulator = demod; @@ -704,9 +709,13 @@ void WaterfallCanvas::OnMouseMoved(wxMouseEvent& event) { SetCursor(wxCURSOR_SIZEWE); if (freqDiff > 0) { - nextDragState = WF_DRAG_BANDWIDTH_LEFT; + if (activeDemodulator->getDemodulatorType() != DEMOD_TYPE_USB) { + nextDragState = WF_DRAG_BANDWIDTH_LEFT; + } } else { - nextDragState = WF_DRAG_BANDWIDTH_RIGHT; + if (activeDemodulator->getDemodulatorType() != DEMOD_TYPE_LSB) { + nextDragState = WF_DRAG_BANDWIDTH_RIGHT; + } } mouseTracker.setVertDragLock(true);