]> git.mxchange.org Git - flightgear.git/commitdiff
NavDisplay: ignore case when matching symbol types in rules.
authorJames Turner <zakalawe@mac.com>
Sat, 28 Apr 2012 21:39:55 +0000 (22:39 +0100)
committerJames Turner <zakalawe@mac.com>
Sat, 28 Apr 2012 21:39:55 +0000 (22:39 +0100)
src/Instrumentation/NavDisplay.cxx

index 5c6720ae19d7b1398cd5bd0b5b3b14feaaaeb9c8..015f8ff595d0f173fdef4ee6eae1876c8b6ee882 100644 (file)
@@ -27,6 +27,7 @@
 
 #include <cassert>
 #include <boost/foreach.hpp>
+#include <boost/algorithm/string/case_conv.hpp>
 #include <algorithm>
 
 #include <osg/Array>
@@ -197,6 +198,7 @@ public:
         }
         
         type = node->getStringValue("type");
+        boost::to_lower(type);
         SGPropertyNode* enableNode = node->getChild("enable");
         if (enableNode) { 
             enable.reset(sgReadCondition(fgGetNode("/"), enableNode));
@@ -1103,6 +1105,7 @@ void NavDisplay::foundPositionedItem(FGPositioned* pos)
     }
     
     string type = FGPositioned::nameForType(pos->type());
+    //boost::to_lower(type);
     if (!anyRuleForType(type)) {
         return; // not diplayed at all, we're done
     }