From c08cc9693e19a08ad59371ae6bdcb97f6e1117d3 Mon Sep 17 00:00:00 2001 From: jmt Date: Thu, 1 Oct 2009 16:50:54 +0000 Subject: [PATCH] Bugfix use of type checks in FGPositioned::findAllWithIdentSortedByRange --- src/Navaids/positioned.cxx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/Navaids/positioned.cxx b/src/Navaids/positioned.cxx index 0553956e1..e603e9eb0 100644 --- a/src/Navaids/positioned.cxx +++ b/src/Navaids/positioned.cxx @@ -568,8 +568,15 @@ FGPositioned::findAllWithIdentSortedByRange(const std::string& aIdent, const SGG List result; NamedIndexRange range = global_namedIndex.equal_range(aIdent); for (; range.first != range.second; ++range.first) { - if (aFilter && !aFilter->pass(range.first->second)) { - continue; + FGPositioned* candidate = range.first->second; + if (aFilter) { + if (aFilter->hasTypeRange() && !aFilter->passType(candidate->type())) { + continue; + } + + if (!aFilter->pass(candidate)) { + continue; + } } result.push_back(range.first->second); -- 2.39.5