mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-25 05:08:37 -05:00
Don't allow range for anything but center freq
This commit is contained in:
parent
4be9fa0538
commit
5573dce408
@ -204,7 +204,12 @@ void FrequencyDialog::OnChar(wxKeyEvent& event) {
|
||||
break;
|
||||
}
|
||||
|
||||
std::string allowed("0123456789.MKGHZmkghz-");
|
||||
std::string allowed("0123456789.MKGHZmkghz");
|
||||
|
||||
// Support '-' for range
|
||||
if (targetMode == FDIALOG_TARGET_DEFAULT && !activeDemod && strValue.length() > 0) {
|
||||
allowed.append("-");
|
||||
}
|
||||
|
||||
if (allowed.find_first_of(c) != std::string::npos || c == WXK_DELETE || c == WXK_BACK || c == WXK_NUMPAD_DECIMAL
|
||||
|| (c >= WXK_NUMPAD0 && c <= WXK_NUMPAD9)) {
|
||||
|
Loading…
Reference in New Issue
Block a user