aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-11-14 18:51:08 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-11-15 09:27:13 +0900
commit1ee08005b2d98e895b173cbe77d5548383b82106 (patch)
treea1fd2cca465d51bddacffbc7c5fdff727839d4e5
parent2235da57a795cd7ffd0ef17ffec274f1a03d6c21 (diff)
downloadsubsurface-1ee08005b2d98e895b173cbe77d5548383b82106.tar.gz
Adds the first DiveNode at 5meters / 10minutes when clicking on plus
Adds the first DiveNode at 5m / 10 minutes when clicking on the plus button on the DiveNotes Table. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--qt-ui/diveplanner.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index 2efc035da..1c8448394 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -1154,6 +1154,9 @@ int DivePlannerPointsModel::addStop(int milimeters, int minutes, int o2, int he,
struct divedatapoint& t = divepoints.last();
milimeters = t.depth;
minutes = t.time + 600; // 10 minutes.
+ } else if (minutes == 0 && milimeters == 0 && row == 0) {
+ milimeters = M_OR_FT(5, 15); // 5m / 15ft
+ minutes = 600; // 10 min
}
if (o2 != -1)
if (!addGas(o2, he))