aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/diveplanner.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/diveplanner.cpp')
-rw-r--r--qt-ui/diveplanner.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index d94e96570..169158987 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -1197,6 +1197,16 @@ void DivePlannerPointsModel::createTemporaryPlan()
#endif
}
+void DivePlannerPointsModel::undoEdition()
+{
+ beginRemoveRows(QModelIndex(), 0, rowCount()-1);
+ divepoints.clear();
+ endRemoveRows();
+ Q_FOREACH(const sample &s, backupSamples){
+ plannerModel->addStop(s.depth.mm, s.time.seconds, tr("Air"), 0);
+ }
+}
+
void DivePlannerPointsModel::deleteTemporaryPlan()
{
deleteTemporaryPlan(diveplan.dp);