summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-ui/diveplanner.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index 06d7ae9d1..ab39d42cb 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -444,10 +444,12 @@ void DivePlannerPointsModel::loadFromDive(dive* d)
for(int i = 0; i < d->dc.samples-1; i++){
backupSamples.push_back( d->dc.sample[i]);
}
+ int lasttime = 0;
Q_FOREACH(const sample &s, backupSamples){
int o2 = 0, he = 0;
- get_gas_from_events(&backupDive->dc, s.time.seconds, &o2, &he);
+ get_gas_from_events(&backupDive->dc, lasttime, &o2, &he);
plannerModel->addStop(s.depth.mm, s.time.seconds, o2, he, 0);
+ lasttime = s.time.seconds;
}
}