aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/diveplanner.cpp
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2013-12-07 23:54:15 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-12-08 09:41:31 +0100
commit1ec61e12881ba35f4b37b130d9dbabb2b15737b4 (patch)
treea942ec7b4a73893545b9be33b2a69e676dff2f42 /qt-ui/diveplanner.cpp
parent28943d2defe437872dafa4c0959177b54c3de4d0 (diff)
downloadsubsurface-1ec61e12881ba35f4b37b130d9dbabb2b15737b4.tar.gz
Remove the air point at 0,0
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/diveplanner.cpp')
-rw-r--r--qt-ui/diveplanner.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index c5fa8b368..897ef2920 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -1393,19 +1393,18 @@ void DivePlannerPointsModel::createTemporaryPlan()
// Get the user-input and calculate the dive info
// Not sure if this is the place to create the diveplan...
// We just start with a surface node at time = 0
- struct divedatapoint *dp = create_dp(0, 0, 0, 0, 0);
- dp->entered = TRUE;
- diveplan.dp = dp;
+ diveplan.dp = NULL;
int lastIndex = -1;
for (int i = 0; i < rowCount(); i++) {
divedatapoint p = at(i);
int deltaT = lastIndex != -1 ? p.time - at(lastIndex).time : p.time;
lastIndex = i;
- dp = plan_add_segment(&diveplan, deltaT, p.depth, p.o2, p.he, p.po2);
+ plan_add_segment(&diveplan, deltaT, p.depth, p.o2, p.he, p.po2);
}
char *cache = NULL;
tempDive = NULL;
const char *errorString = NULL;
+ struct divedatapoint *dp = NULL;
for (int i = 0; i < MAX_CYLINDERS; i++) {
cylinder_t *cyl = &stagingDive->cylinder[i];
if (cyl->depth.mm) {