summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2018-06-17 23:20:02 +0200
committerGravatar Robert C. Helling <helling@atdotde.de>2018-06-24 09:35:55 +0200
commit068b4c65bd7d6b2a37212002c7ac220d3f9c9f97 (patch)
treeec30d2b2e0b81c5e9335ac5eead2fb345d819abf
parent0f77d73df28ff6c8c9f83c30232e6481e181ffae (diff)
downloadsubsurface-068b4c65bd7d6b2a37212002c7ac220d3f9c9f97.tar.gz
When adding new waypoints, use previous setpoint.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
-rw-r--r--qt-models/diveplannermodel.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/qt-models/diveplannermodel.cpp b/qt-models/diveplannermodel.cpp
index 800884c12..f14eb7ce2 100644
--- a/qt-models/diveplannermodel.cpp
+++ b/qt-models/diveplannermodel.cpp
@@ -723,10 +723,12 @@ int DivePlannerPointsModel::addStop(int milimeters, int seconds, int cylinderid_
cylinderid = divepoints.at(row).cylinderid;
if (divemode == UNDEF_COMP_TYPE)
divemode = divepoints.at(row).divemode;
+ ccpoint = divepoints.at(row).setpoint;
} else if (row > 0) {
cylinderid = divepoints.at(row - 1).cylinderid;
if (divemode == UNDEF_COMP_TYPE)
divemode = divepoints.at(row - 1).divemode;
+ ccpoint = divepoints.at(row -1).setpoint;
}
}
if (divemode == UNDEF_COMP_TYPE)