addLine(sym->pos, sym->endPos, def->lineColor);
}
- if (!def->hasText) {
+ if (!def->hasText || !def->textEnabled) {
return;
}
FGNavRecord* NavDisplay::processNavRadio(const SGPropertyNode_ptr& radio)
{
- double mhz = radio->getDoubleValue("frequencies/selected-mhz", 0.0);
- FGNavRecord* nav = globals->get_navlist()->findByFreq(mhz, _pos);
+ double mhz = radio->getDoubleValue("frequencies/selected-mhz", 0.0);
+ FGNavRecord* nav = FGNavList::findByFreq(mhz, _pos, FGNavList::navFilter());
if (!nav || (nav->ident() != radio->getStringValue("nav-id"))) {
// station was not found
return NULL;
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) {
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
}
BOOST_FOREACH(SymbolRule* r, rules) {
SymbolInstance* ins = addSymbolInstance(projected, heading, r->getDefinition(), vars);
- if (pos->type() == FGPositioned::RUNWAY) {
+ if ((ins)&&(pos->type() == FGPositioned::RUNWAY)) {
FGRunway* rwy = (FGRunway*) pos;
ins->endPos = projectGeod(rwy->end());
}