diff options
author | Robert C. Helling <helling@atdotde.de> | 2017-03-28 15:04:35 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-03-28 13:31:45 -0700 |
commit | 1b744c7639fe1c9cbaa22ae16b60dc48dc1e8944 (patch) | |
tree | 16d74b1aecbf26c603bdb4b5a4d10a675ae29bde /qt-models/diveplannermodel.cpp | |
parent | d344779c47451bd5b7a85972da4895ea2649e5b3 (diff) | |
download | subsurface-1b744c7639fe1c9cbaa22ae16b60dc48dc1e8944.tar.gz |
Always show notes when replanning
... as per popular request. Plus adding const keyword to constant
strings.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Diffstat (limited to 'qt-models/diveplannermodel.cpp')
-rw-r--r-- | qt-models/diveplannermodel.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/qt-models/diveplannermodel.cpp b/qt-models/diveplannermodel.cpp index c35471a44..bd90e4dfb 100644 --- a/qt-models/diveplannermodel.cpp +++ b/qt-models/diveplannermodel.cpp @@ -873,7 +873,7 @@ void DivePlannerPointsModel::createPlan(bool replanCopy) setRecalc(oldRecalc); //TODO: C-based function here? - bool did_deco = plan(&diveplan, &cache, isPlanner(), true); + plan(&diveplan, &cache, isPlanner(), true); free(cache); if (!current_dive || displayed_dive.id != current_dive->id) { // we were planning a new dive, not re-planning an existing on @@ -896,8 +896,7 @@ void DivePlannerPointsModel::createPlan(bool replanCopy) QString oldnotes(current_dive->notes); if (oldnotes.indexOf(QString(disclaimer).left(40)) >= 0) oldnotes.truncate(oldnotes.indexOf(QString(displayed_dive.notes).left(40))); - if (did_deco) - oldnotes.append(displayed_dive.notes); + oldnotes.append(displayed_dive.notes); displayed_dive.notes = strdup(oldnotes.toUtf8().data()); } copy_dive(&displayed_dive, current_dive); |