diff options
Diffstat (limited to 'qt-ui/diveplanner.cpp')
-rw-r--r-- | qt-ui/diveplanner.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp index 1d0b27869..b099cbe40 100644 --- a/qt-ui/diveplanner.cpp +++ b/qt-ui/diveplanner.cpp @@ -829,6 +829,8 @@ int DivePlannerPointsModel::addStop(int milimeters, int seconds, gasmix *gas_in, if (usePrevious) { if (row < divepoints.count()) { gas = divepoints.at(row).gasmix; + } else if (row > 0) { + gas = divepoints.at(row - 1).gasmix; } else { if (!addGas(air)) qDebug("addGas failed"); // FIXME add error propagation |