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.
This commit is contained in:
parent
4873a28e97
commit
ea81903f67
1 changed files with 3 additions and 2 deletions
|
@ -2115,9 +2115,10 @@ void NavDataCache::dropGroundnetFor(PositionedID aAirport)
|
||||||
sqlite3_bind_int64(q, 2, aAirport);
|
sqlite3_bind_int64(q, 2, aAirport);
|
||||||
d->execUpdate(q);
|
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_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);
|
d->execUpdate(q);
|
||||||
|
|
||||||
q = d->prepare("DELETE FROM positioned WHERE (type=?1 OR type=?2) AND airport=?3");
|
q = d->prepare("DELETE FROM positioned WHERE (type=?1 OR type=?2) AND airport=?3");
|
||||||
|
|
Loading…
Add table
Reference in a new issue