summaryrefslogtreecommitdiffstats
path: root/qt-ui/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r--qt-ui/mainwindow.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 0eb753203..2fc700752 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -491,6 +491,8 @@ void MainWindow::on_actionAddDive_triggered()
DivePlannerPointsModel::instance()->setPlanMode(DivePlannerPointsModel::ADD);
clear_dive(&displayed_dive);
+ // but wait - we need a valid id... and a start time and an appropriatae dc model
+ displayed_dive.id = dive_getUniqID(&displayed_dive);
displayed_dive.when = QDateTime::currentMSecsSinceEpoch() / 1000L + gettimezoneoffset() + 3600;
displayed_dive.dc.model = "manually added dive"; // don't translate! this is stored in the XML file