diff options
-rw-r--r-- | qt-ui/diveplanner.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp index 643f35a2d..39fe0548f 100644 --- a/qt-ui/diveplanner.cpp +++ b/qt-ui/diveplanner.cpp @@ -1416,9 +1416,11 @@ void DivePlannerPointsModel::undoEdition() { clear(); Q_FOREACH(const sample &s, backupSamples){ - int o2, he; - get_gas_from_events(¤t_dive->dc, s.time.seconds, &o2, &he); - plannerModel->addStop(s.depth.mm, s.time.seconds, o2, he, 0); + if (s.time.seconds > 0) { + int o2, he; + get_gas_from_events(¤t_dive->dc, s.time.seconds, &o2, &he); + plannerModel->addStop(s.depth.mm, s.time.seconds, o2, he, 0); + } } } |