From 682c229313f15226b28c3c073b1d014a9295b0b3 Mon Sep 17 00:00:00 2001 From: James Turner Date: Sun, 29 Oct 2017 14:00:59 +0000 Subject: [PATCH] Preserve loaded flight plan departure/arrival MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When loading or cloning, don’t flag the departure and arrival as changing, since this forces it to be discarded and rebuilt. --- src/Navaids/FlightPlan.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Navaids/FlightPlan.cxx b/src/Navaids/FlightPlan.cxx index 23349b4a7..b71c5b28b 100644 --- a/src/Navaids/FlightPlan.cxx +++ b/src/Navaids/FlightPlan.cxx @@ -118,6 +118,10 @@ FlightPlan* FlightPlan::clone(const string& newIdent) const c->setSTAR(_star); c->setSID(_sid); +// mark data as unchanged since this is a clean plan + c->_arrivalChanged = false; + c->_departureChanged = false; + // copy legs c->_waypointsChanged = true; for (int l=0; l < numLegs(); ++l) { @@ -692,6 +696,10 @@ bool FlightPlan::load(const SGPath& path) setIdent(path.file_base()); } + // mark data as unchanged since this is a clean plan + _arrivalChanged = false; + _departureChanged = false; + _waypointsChanged = true; unlockDelegates();