mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 22:43:25 +00:00
Keep old notes when saving as new dive in replan
... but discard an old disclaimer and runtime table if present. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
e538347424
commit
412844c02b
1 changed files with 5 additions and 0 deletions
|
@ -1328,6 +1328,11 @@ void DivePlannerPointsModel::createPlan(bool replanCopy)
|
|||
if (current_dive->divetrip)
|
||||
add_dive_to_trip(copy, current_dive->divetrip);
|
||||
record_dive(copy);
|
||||
QString oldnotes(current_dive->notes);
|
||||
if (oldnotes.indexOf(QString(disclaimer)) >= 0)
|
||||
oldnotes.truncate(oldnotes.indexOf(QString(disclaimer)));
|
||||
oldnotes.append(displayed_dive.notes);
|
||||
displayed_dive.notes = strdup(oldnotes.toUtf8().data());
|
||||
}
|
||||
copy_dive(&displayed_dive, current_dive);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue