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.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index eb7febed7..8b216bd8c 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -47,7 +47,6 @@ MainWindow::MainWindow() : ui(new Ui::MainWindow()), helpView(0)
connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), ui->ListWidget, SLOT(reloadHeaderActions()));
connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), ui->ProfileWidget, SLOT(refresh()));
ui->mainErrorMessage->hide();
- ui->ProfileWidget->setFocusProxy(ui->ListWidget);
ui->ListWidget->reload(DiveTripModel::TREE);
initialUiSetup();
readSettings();
@@ -205,11 +204,20 @@ void MainWindow::on_actionDownloadWeb_triggered()
void MainWindow::on_actionEditDeviceNames_triggered()
{
- qDebug("actionEditDeviceNames");}
+ qDebug("actionEditDeviceNames");
+}
void MainWindow::on_actionAddDive_triggered()
{
- qDebug("actionAddDive");
+ struct dive *dive;
+ dive = alloc_dive();
+ record_dive(dive);
+ process_dives(FALSE, FALSE);
+
+ ui->InfoWidget->reload();
+ ui->globe->reload();
+ ui->ListWidget->reload(DiveTripModel::TREE);
+ ui->ListWidget->setFocus();
}
void MainWindow::on_actionRenumber_triggered()