Fixed #122: frequencies should be sorted
This commit is contained in:
parent
ee339431c7
commit
35be0fcc29
@ -6958,7 +6958,12 @@ void MainWindow::buildFrequencyMenu(QMenu *menu){
|
|||||||
|
|
||||||
menu->addSeparator();
|
menu->addSeparator();
|
||||||
|
|
||||||
foreach(auto f, m_config.frequencies()->frequency_list()){
|
auto frequencies = m_config.frequencies()->frequency_list();
|
||||||
|
qSort(frequencies.begin(), frequencies.end(), [](FrequencyList_v2::Item &a, FrequencyList_v2::Item &b) {
|
||||||
|
return a.frequency_ < b.frequency_;
|
||||||
|
});
|
||||||
|
|
||||||
|
foreach(auto f, frequencies){
|
||||||
auto freq = Radio::pretty_frequency_MHz_string(f.frequency_);
|
auto freq = Radio::pretty_frequency_MHz_string(f.frequency_);
|
||||||
auto const& band = m_config.bands ()->find (f.frequency_);
|
auto const& band = m_config.bands ()->find (f.frequency_);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user