mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-23 12:18:37 -05:00
fix for SSB selection issue
This commit is contained in:
parent
3c5bad4e3d
commit
fa54aab01f
@ -683,7 +683,12 @@ void WaterfallCanvas::OnMouseMoved(wxMouseEvent& event) {
|
|||||||
near_dist = dist;
|
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);
|
long edge_dist = abs(halfBw - dist);
|
||||||
if (edge_dist < near_dist) {
|
if (edge_dist < near_dist) {
|
||||||
activeDemodulator = demod;
|
activeDemodulator = demod;
|
||||||
@ -704,10 +709,14 @@ void WaterfallCanvas::OnMouseMoved(wxMouseEvent& event) {
|
|||||||
SetCursor(wxCURSOR_SIZEWE);
|
SetCursor(wxCURSOR_SIZEWE);
|
||||||
|
|
||||||
if (freqDiff > 0) {
|
if (freqDiff > 0) {
|
||||||
|
if (activeDemodulator->getDemodulatorType() != DEMOD_TYPE_USB) {
|
||||||
nextDragState = WF_DRAG_BANDWIDTH_LEFT;
|
nextDragState = WF_DRAG_BANDWIDTH_LEFT;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (activeDemodulator->getDemodulatorType() != DEMOD_TYPE_LSB) {
|
||||||
nextDragState = WF_DRAG_BANDWIDTH_RIGHT;
|
nextDragState = WF_DRAG_BANDWIDTH_RIGHT;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
mouseTracker.setVertDragLock(true);
|
mouseTracker.setVertDragLock(true);
|
||||||
mouseTracker.setHorizDragLock(false);
|
mouseTracker.setHorizDragLock(false);
|
||||||
|
Loading…
Reference in New Issue
Block a user