summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/planner.c6
-rw-r--r--core/planner.h2
-rw-r--r--qt-models/diveplannermodel.cpp4
3 files changed, 6 insertions, 6 deletions
diff --git a/core/planner.c b/core/planner.c
index b8a8b63b5..a3ae39a1e 100644
--- a/core/planner.c
+++ b/core/planner.c
@@ -41,7 +41,7 @@ extern void reset_regression();
pressure_t first_ceiling_pressure, max_bottom_ceiling_pressure = {};
-const char *disclaimer;
+char *disclaimer;
int plot_depth = 0;
#if DEBUG_PLAN
void dump_plan(struct diveplan *diveplan)
@@ -555,9 +555,9 @@ static void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool
plan_display_transitions = prefs.display_transitions;
if (decoMode() == VPMB) {
- deco = "VPM-B";
+ deco = translate("gettextFromC", "VPM-B");
} else {
- deco = "BUHLMANN";
+ deco = translate("gettextFromC", "BUHLMANN");
}
snprintf(buf, sizeof(buf), translate("gettextFromC", "DISCLAIMER / WARNING: THIS IS A NEW IMPLEMENTATION OF THE %s "
diff --git a/core/planner.h b/core/planner.h
index 3298d7ddb..919fddac8 100644
--- a/core/planner.h
+++ b/core/planner.h
@@ -24,7 +24,7 @@ extern bool diveplan_empty(struct diveplan *diveplan);
extern void free_dps(struct diveplan *diveplan);
extern struct dive *planned_dive;
extern char *cache_data;
-extern const char *disclaimer;
+extern char *disclaimer;
extern double plangflow, plangfhigh;
#ifdef __cplusplus
diff --git a/qt-models/diveplannermodel.cpp b/qt-models/diveplannermodel.cpp
index 26e4fc1ba..c35471a44 100644
--- a/qt-models/diveplannermodel.cpp
+++ b/qt-models/diveplannermodel.cpp
@@ -894,8 +894,8 @@ void DivePlannerPointsModel::createPlan(bool replanCopy)
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)));
+ 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);
displayed_dive.notes = strdup(oldnotes.toUtf8().data());