From ea81903f6707bb50a362bca64e005bf47f443a8c Mon Sep 17 00:00:00 2001 From: James Turner Date: Sun, 6 Jan 2013 20:34:34 +0000 Subject: [PATCH] NavCache: fix an issue reloading ground-nets. AndersG noticed an issue when a ground-net file is edited. The DROP commands prior to the reload were wrong, fixed now to delete all ground-net entries before the file is read. --- src/Navaids/NavDataCache.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Navaids/NavDataCache.cxx b/src/Navaids/NavDataCache.cxx index 6b102f2fb..a79778c70 100644 --- a/src/Navaids/NavDataCache.cxx +++ b/src/Navaids/NavDataCache.cxx @@ -2115,9 +2115,10 @@ void NavDataCache::dropGroundnetFor(PositionedID aAirport) sqlite3_bind_int64(q, 2, aAirport); d->execUpdate(q); - q = d->prepare("DELETE FROM taxi_node WHERE rowid IN (SELECT rowid FROM positioned WHERE type=?1 AND airport=?2)"); + q = d->prepare("DELETE FROM taxi_node WHERE rowid IN (SELECT rowid FROM positioned WHERE (type=?1 OR type=?2) AND airport=?3)"); sqlite3_bind_int(q, 1, FGPositioned::TAXI_NODE); - sqlite3_bind_int64(q, 2, aAirport); + sqlite3_bind_int(q, 2, FGPositioned::PARKING); + sqlite3_bind_int64(q, 3, aAirport); d->execUpdate(q); q = d->prepare("DELETE FROM positioned WHERE (type=?1 OR type=?2) AND airport=?3"); -- 2.39.5