From 88847ab02ea033181f8fbf7af4eea43abe42e231 Mon Sep 17 00:00:00 2001 From: James Turner Date: Sun, 2 Dec 2012 23:55:35 +0000 Subject: [PATCH] Whoops, work-around for #926 correctly. Hyde confirmed this fixes the issue, leaving the code present but disabled for the moment. --- src/Navaids/navdb.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Navaids/navdb.cxx b/src/Navaids/navdb.cxx index abc7975d5..42e0c2381 100644 --- a/src/Navaids/navdb.cxx +++ b/src/Navaids/navdb.cxx @@ -158,16 +158,13 @@ static PositionedID readNavFromStream(std::istream& aStream, if ((type >= FGPositioned::OM) && (type <= FGPositioned::IM)) { AirportRunwayPair arp(cache->findAirportRunway(name)); -#if 0 - // code is disabled since it's causing some problems, see - // http://code.google.com/p/flightgear-bugs/issues/detail?id=926 if (arp.second && (elev_ft < 0.01)) { // snap to runway elevation FGPositioned* runway = cache->loadById(arp.second); assert(runway); pos.setElevationFt(runway->geod().getElevationFt()); } -#endif + return cache->insertNavaid(type, string(), name, pos, 0, 0, 0, arp.first, arp.second); } @@ -186,10 +183,14 @@ static PositionedID readNavFromStream(std::istream& aStream, if (arp.second) { runway = static_cast(cache->loadById(arp.second)); assert(runway); +#if 0 + // code is disabled since it's causing some problems, see + // http://code.google.com/p/flightgear-bugs/issues/detail?id=926 if (elev_ft < 0.01) { // snap to runway elevation pos.setElevationFt(runway->geod().getElevationFt()); } +#endif } // of found runway in the DB } // of type is runway-related