From 2f095a04ed69d9aa14b47dc4acde6b3225b2d65e Mon Sep 17 00:00:00 2001 From: Christoph Berg Date: Mon, 24 May 2021 21:55:29 +0200 Subject: New upstream version 2.4.0+repack --- models/FrequencyList.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'models/FrequencyList.cpp') diff --git a/models/FrequencyList.cpp b/models/FrequencyList.cpp index beae8fd6..034af895 100644 --- a/models/FrequencyList.cpp +++ b/models/FrequencyList.cpp @@ -965,8 +965,11 @@ auto FrequencyList_v2::all_bands (Region region, Mode mode) const -> BandSet BandSet result; for (auto const& item : m_->frequency_list_) { - if (region == IARURegions::ALL || item.region_ == region - || mode == Modes::ALL || item.mode_ == mode) + // Match frequencies that are for all regions, for the specified + // region (which can also be "all"), and where the mode matches + // the specified mode (which can also be "all"). + if ((region == IARURegions::ALL || item.region_ == IARURegions::ALL || item.region_ == region) + && (mode == Modes::ALL || item.mode_ == Modes::ALL || item.mode_ == mode)) { result << m_->bands_->find (item.frequency_); } -- cgit v1.2.3