Waterfall bandwidth control and new demod hover state tweaks

This commit is contained in:
Charles J. Cliffe 2015-02-03 19:11:30 -05:00
parent 1a9f7d31b7
commit ec3e851354
1 changed files with 2 additions and 2 deletions

View File

@ -656,7 +656,7 @@ void WaterfallCanvas::OnMouseMoved(wxMouseEvent& event) {
} else {
setStatusText("Click and drag to set the current demodulator range.");
}
} else if (demodsHover->size()) {
} else if (demodsHover->size() && !shiftDown) {
int hovered = -1;
long near_dist = getBandwidth();
@ -674,7 +674,7 @@ void WaterfallCanvas::OnMouseMoved(wxMouseEvent& event) {
near_dist = dist;
}
if (dist <= halfBw && dist >= (int) ((float) halfBw / (float) 1.5)) {
if (dist <= halfBw && dist >= (int) ((float) halfBw / (1.5 - (0.65 * (1.0-(float)(wxGetApp().getSampleRate() - getBandwidth())/(float)wxGetApp().getSampleRate()))))) {
long edge_dist = abs(halfBw - dist);
if (edge_dist < near_dist) {
activeDemodulator = demod;