Preserve loaded flight plan departure/arrival
When loading or cloning, don’t flag the departure and arrival as changing, since this forces it to be discarded and rebuilt.
This commit is contained in:
parent
ea31cb30e3
commit
682c229313
1 changed files with 8 additions and 0 deletions
|
@ -118,6 +118,10 @@ FlightPlan* FlightPlan::clone(const string& newIdent) const
|
||||||
c->setSTAR(_star);
|
c->setSTAR(_star);
|
||||||
c->setSID(_sid);
|
c->setSID(_sid);
|
||||||
|
|
||||||
|
// mark data as unchanged since this is a clean plan
|
||||||
|
c->_arrivalChanged = false;
|
||||||
|
c->_departureChanged = false;
|
||||||
|
|
||||||
// copy legs
|
// copy legs
|
||||||
c->_waypointsChanged = true;
|
c->_waypointsChanged = true;
|
||||||
for (int l=0; l < numLegs(); ++l) {
|
for (int l=0; l < numLegs(); ++l) {
|
||||||
|
@ -692,6 +696,10 @@ bool FlightPlan::load(const SGPath& path)
|
||||||
setIdent(path.file_base());
|
setIdent(path.file_base());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// mark data as unchanged since this is a clean plan
|
||||||
|
_arrivalChanged = false;
|
||||||
|
_departureChanged = false;
|
||||||
|
|
||||||
_waypointsChanged = true;
|
_waypointsChanged = true;
|
||||||
unlockDelegates();
|
unlockDelegates();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue