diff options
author | Robert C. Helling <helling@atdotde.de> | 2017-03-10 07:22:31 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-03-11 08:03:25 -0800 |
commit | 295b1b78d888b528f7a5a23411b1a82d4b39eed1 (patch) | |
tree | e41ef5bb9fcfbdec3c536be1cb653faac047d81e /qt-models/diveplannermodel.cpp | |
parent | af96ec5d04b09a87696b3f292bc5ad5378d26f75 (diff) | |
download | subsurface-295b1b78d888b528f7a5a23411b1a82d4b39eed1.tar.gz |
Make depth conversion work for negative depths
This is needed in the altitude pressure conversion as there
negative altitudes are possible (for diving in the netherlands
or the Dead Sea).
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Diffstat (limited to 'qt-models/diveplannermodel.cpp')
-rw-r--r-- | qt-models/diveplannermodel.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-models/diveplannermodel.cpp b/qt-models/diveplannermodel.cpp index 4a33b15c3..0327a6f6f 100644 --- a/qt-models/diveplannermodel.cpp +++ b/qt-models/diveplannermodel.cpp @@ -288,7 +288,7 @@ bool DivePlannerPointsModel::setData(const QModelIndex &index, const QVariant &v switch (index.column()) { case DEPTH: if (value.toInt() >= 0) { - p.depth = units_to_depth(value.toInt()); + p.depth = units_to_depth(value.toInt()).mm; if (updateMaxDepth()) CylindersModel::instance()->updateBestMixes(); } |