summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/diveplanner.cpp2
-rw-r--r--qt-ui/mainwindow.cpp6
2 files changed, 7 insertions, 1 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index d634aadf8..9a1f0cb3d 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -4,6 +4,7 @@
#include "modeldelegates.h"
#include "ui_diveplanner.h"
#include "mainwindow.h"
+#include "maintab.h"
#include "tableview.h"
#include "graphicsview-common.h"
@@ -1149,6 +1150,7 @@ void DivePlannerPointsModel::createTemporaryPlan()
tempDive = NULL;
char *errorString = NULL;
plan(&diveplan, &cache, &tempDive, isPlanner(), &errorString);
+ mainWindow()->information()->updateDiveInfo(get_divenr(tempDive));
#if DEBUG_PLAN
dump_plan(&diveplan);
#endif
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 0b1f57ca9..593bbf166 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -258,7 +258,11 @@ void MainWindow::on_actionAddDive_triggered()
disableDcShortcuts();
DivePlannerPointsModel::instance()->setPlanMode(false);
ui->stackedWidget->setCurrentIndex(1);
- ui->infoPane->setCurrentIndex(1);
+ ui->infoPane->setCurrentIndex(0);
+ ui->InfoWidget->clearStats();
+ ui->InfoWidget->clearInfo();
+ ui->InfoWidget->clearEquipment();
+ ui->InfoWidget->updateDiveInfo(-1);
}
void MainWindow::on_actionRenumber_triggered()