]> git.mxchange.org Git - flightgear.git/commitdiff
Bugfix use of type checks in FGPositioned::findAllWithIdentSortedByRange
authorjmt <jmt>
Thu, 1 Oct 2009 16:50:54 +0000 (16:50 +0000)
committerTim Moore <timoore@redhat.com>
Sun, 4 Oct 2009 00:04:18 +0000 (02:04 +0200)
src/Navaids/positioned.cxx

index 0553956e10c334d663aa19ed19e9ac6bdf1ed38d..e603e9eb0af3e3bc6c97f2a2773f683f96977235 100644 (file)
@@ -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);