From 5fc98e4ed050d0588bf1e6ed4d0c6758c6688931 Mon Sep 17 00:00:00 2001
From: James Turner <zakalawe@mac.com>
Date: Sun, 10 Jun 2012 11:11:42 +0100
Subject: [PATCH] Fix another case-sensitivity issue in the NavDisplay.

---
 src/Instrumentation/NavDisplay.cxx | 16 +---------------
 src/Instrumentation/NavDisplay.hxx |  2 --
 2 files changed, 1 insertion(+), 17 deletions(-)

diff --git a/src/Instrumentation/NavDisplay.cxx b/src/Instrumentation/NavDisplay.cxx
index 5664828f9..30be600fd 100644
--- a/src/Instrumentation/NavDisplay.cxx
+++ b/src/Instrumentation/NavDisplay.cxx
@@ -1114,21 +1114,6 @@ bool NavDisplay::anyRuleForType(const string& type) const
     return false;
 }
 
-bool NavDisplay::anyRuleMatches(const string& type, const string_set& states) const
-{
-    BOOST_FOREACH(SymbolRule* r, _rules) {
-        if (!r->enabled || (r->type != type)) {
-            continue;
-        }
-
-        if (r->matches(states)) {
-            return true;
-        }
-    } // of rules iteration
-    
-    return false;
-}
-
 void NavDisplay::findRules(const string& type, const string_set& states, SymbolRuleVector& rules)
 {
     BOOST_FOREACH(SymbolRule* candidate, _rules) {
@@ -1152,6 +1137,7 @@ bool NavDisplay::isPositionedShown(FGPositioned* pos)
 void NavDisplay::isPositionedShownInner(FGPositioned* pos, SymbolRuleVector& rules)
 {
   string type = FGPositioned::nameForType(pos->type());
+  boost::to_lower(type);
   if (!anyRuleForType(type)) {
     return; // not diplayed at all, we're done
   }
diff --git a/src/Instrumentation/NavDisplay.hxx b/src/Instrumentation/NavDisplay.hxx
index d91cf2ab5..870c3cc30 100644
--- a/src/Instrumentation/NavDisplay.hxx
+++ b/src/Instrumentation/NavDisplay.hxx
@@ -120,8 +120,6 @@ private:
     void processAI();
     void computeAIStates(const SGPropertyNode* ai, string_set& states);
     
-    
-    bool anyRuleMatches(const std::string& type, const string_set& states) const;
     void findRules(const std::string& type, const string_set& states, SymbolRuleVector& rules);
     
     SymbolInstance* addSymbolInstance(const osg::Vec2& proj, double heading, SymbolDef* def, SGPropertyNode* vars);