]> git.mxchange.org Git - flightgear.git/commitdiff
Fix for bug, ILS not visible in map on first run.
authorJames Turner <zakalawe@mac.com>
Sat, 23 Feb 2013 14:51:00 +0000 (14:51 +0000)
committerJames Turner <zakalawe@mac.com>
Sat, 23 Feb 2013 14:51:00 +0000 (14:51 +0000)
When calling setILS, in-memory runways did not get updated. This showed up in the map, but also affecting a few other places. Will port this to 2.10.1 when that process starts.

src/Navaids/NavDataCache.cxx

index 0f1137c3121d0f5214656211510d33f771ff3097..d8ba979d9e154cad28f43b080b9e26792846eed1 100644 (file)
@@ -1561,6 +1561,12 @@ void NavDataCache::setRunwayILS(PositionedID runway, PositionedID ils)
   sqlite3_bind_int64(d->setRunwayILS, 1, runway);
   sqlite3_bind_int64(d->setRunwayILS, 2, ils);
   d->execUpdate(d->setRunwayILS);
+    
+  // and the in-memory one
+  if (d->cache.find(runway) != d->cache.end()) {
+    FGRunway* instance = (FGRunway*) d->cache[runway].ptr();
+    instance->setILS(ils);
+  }
 }
   
 void NavDataCache::updateRunwayThreshold(PositionedID runwayID, const SGGeod &aThreshold,