summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dive.h1
-rw-r--r--qt-ui/diveplanner.cpp2
2 files changed, 3 insertions, 0 deletions
diff --git a/dive.h b/dive.h
index 1c1d49640..2c69cbff8 100644
--- a/dive.h
+++ b/dive.h
@@ -726,6 +726,7 @@ void get_gas_string(int o2, int he, char *buf, int len);
struct divedatapoint *create_dp(int time_incr, int depth, int o2, int he, int po2);
void dump_plan(struct diveplan *diveplan);
void plan(struct diveplan *diveplan, char **cached_datap, struct dive **divep, char **error_string_p);
+void delete_single_dive(int idx);
struct event *get_next_event(struct event *event, char *name);
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index 25d5df11d..95b6c211c 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -2,6 +2,7 @@
#include "graphicsview-common.h"
#include "../dive.h"
+#include "../divelist.h"
#include <cmath>
#include <QMouseEvent>
#include <QDebug>
@@ -497,6 +498,7 @@ void DivePlannerGraphics::createDecoStops()
diveBg->setBrush(pat);
deleteTemporaryDivePlan(diveplan.dp);
+ delete_single_dive(get_divenr(dive));
}
void DivePlannerGraphics::deleteTemporaryDivePlan(divedatapoint* dp)