diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-02-13 12:38:56 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-02-13 14:27:35 -0800 |
commit | 32ad046f5681ad02e3f9842075447e880145267d (patch) | |
tree | 4679bac9d6f20acbecebb20a8a05a634534c1808 /qt-ui/mainwindow.cpp | |
parent | 06e578424e272b1c500c2a9e79b4367465fb4ac8 (diff) | |
download | subsurface-32ad046f5681ad02e3f9842075447e880145267d.tar.gz |
Allow editing of dive sites
And hook things up when double clicking the globe.
The user experience isn't consistent with what we do on the main tab
(i.e., no coloring of fields that are changed), but it seems to work.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r-- | qt-ui/mainwindow.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 7776f312e..6a67befa1 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -113,6 +113,8 @@ MainWindow::MainWindow() : QMainWindow(), connect(plannerDetails->printPlan(), SIGNAL(pressed()), divePlannerWidget(), SLOT(printDecoPlan())); connect(mainTab, SIGNAL(requestDiveSiteEdit(uint32_t)), this, SLOT(enableDiveSiteEdit(uint32_t))); connect(locationInformation, SIGNAL(informationManagementEnded()), this, SLOT(setDefaultState())); + connect(locationInformation, SIGNAL(informationManagementEnded()), this, SLOT(refreshDisplay())); + #ifdef NO_PRINTING ui.printPlan->hide(); ui.menuFile->removeAction(ui.actionPrint); @@ -133,10 +135,7 @@ MainWindow::MainWindow() : QMainWindow(), #ifdef NO_MARBLE ui.menuView->removeAction(ui.actionViewGlobe); #else - // FIXME - // TODO - // we need this on the dive sites - //connect(globe(), SIGNAL(coordinatesChanged()), information(), SLOT(updateGpsCoordinates())); + connect(globe(), SIGNAL(coordinatesChanged()), locationInformation, SLOT(updateGpsCoordinates())); #endif #ifdef NO_USERMANUAL ui.menuHelp->removeAction(ui.actionUserManual); @@ -218,7 +217,6 @@ LocationInformationWidget *MainWindow::locationInformationWidget() { } void MainWindow::enableDiveSiteEdit(uint32_t id) { - locationInformationWidget()->setLocationId(id); setApplicationState("EditDiveSite"); } @@ -276,6 +274,7 @@ void MainWindow::current_dive_changed(int divenr) } graphics()->plotDive(); information()->updateDiveInfo(); + locationInformationWidget()->setLocationId(displayed_dive.dive_site_uuid); } void MainWindow::on_actionNew_triggered() |