mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-07-26 10:42:26 -04:00
Allow nummeric only band names in band hopping setup
This change allows the old and new format to coexist. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@5476 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
7abcef5057
commit
340ec6b38a
@ -4295,9 +4295,17 @@ void MainWindow::bandHopping()
|
|||||||
if(isun==2) s=m_sunsetBands;
|
if(isun==2) s=m_sunsetBands;
|
||||||
if(isun==3) s=m_nightBands;
|
if(isun==3) s=m_nightBands;
|
||||||
|
|
||||||
|
// allow numeric only band names
|
||||||
|
for (auto& item : s) {
|
||||||
|
if (!item.endsWith ('m')) {
|
||||||
|
item += 'm';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
QString new_band;
|
QString new_band;
|
||||||
if (s.contains (hopping_bands[iband0])) { //See if designated band is active
|
int index;
|
||||||
new_band = hopping_bands[iband0];
|
if ((index = s.indexOf (hopping_bands[iband0])) >= 0) { //See if designated band is active
|
||||||
|
new_band = hopping_bands[index];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// If designated band is not active, choose one that is active
|
// If designated band is not active, choose one that is active
|
||||||
@ -4343,7 +4351,14 @@ void MainWindow::bandHopping()
|
|||||||
|
|
||||||
// Produce a short tuneup signal
|
// Produce a short tuneup signal
|
||||||
m_tuneup = false;
|
m_tuneup = false;
|
||||||
if (m_tuneBands.contains (m_band00)) {
|
auto tu_bands = m_tuneBands;
|
||||||
|
// allow numeric only band names
|
||||||
|
for (auto& item : tu_bands) {
|
||||||
|
if (!item.endsWith ('m')) {
|
||||||
|
item += 'm';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (tu_bands.contains (m_band00)) {
|
||||||
m_tuneup = true;
|
m_tuneup = true;
|
||||||
on_tuneButton_clicked (true);
|
on_tuneButton_clicked (true);
|
||||||
tuneATU_Timer->start (2500);
|
tuneATU_Timer->start (2500);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user