summaryrefslogtreecommitdiff
path: root/models/FrequencyList.cpp
diff options
context:
space:
mode:
authorChristoph Berg <myon@debian.org>2021-05-24 21:56:12 +0200
committerChristoph Berg <myon@debian.org>2021-05-24 21:56:12 +0200
commit5d6ce68ef66fcb9fa736d942b757f6b039684a8e (patch)
treeac5434b0bb2c1610af8fd22a3d50bee3d2047cd8 /models/FrequencyList.cpp
parentf31b3d26dc737dcc9d2e9b8ea34690ffc669815c (diff)
parent2f095a04ed69d9aa14b47dc4acde6b3225b2d65e (diff)
Update upstream source from tag 'upstream/2.4.0+repack'
Update to upstream version '2.4.0+repack' with Debian dir 9ca745702cabe41ba6c3b1e36a86b074ebd5a230
Diffstat (limited to 'models/FrequencyList.cpp')
-rw-r--r--models/FrequencyList.cpp7
1 files changed, 5 insertions, 2 deletions
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_);
}