summaryrefslogtreecommitdiffstats
path: root/qt-ui/mainwindow.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-02-12 02:04:20 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-02-12 11:19:27 -0800
commit0e6345f65b041b5005c75b83792ca98d8ef4f766 (patch)
treeb0ec0df52a744e579be05442cab5da61d2329774 /qt-ui/mainwindow.cpp
parent5c4d2660604af8925b757025571a8dcc36da1cdc (diff)
downloadsubsurface-0e6345f65b041b5005c75b83792ca98d8ef4f766.tar.gz
Correctly connect the maintab to dive site management
We now have a working uuid - use it. And populate the fields accordingly. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r--qt-ui/mainwindow.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index eca4c08f8..30ab5e5df 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -111,7 +111,7 @@ MainWindow::MainWindow() : QMainWindow(),
connect(DivePlannerPointsModel::instance(), SIGNAL(planCreated()), this, SLOT(planCreated()));
connect(DivePlannerPointsModel::instance(), SIGNAL(planCanceled()), this, SLOT(planCanceled()));
connect(plannerDetails->printPlan(), SIGNAL(pressed()), divePlannerWidget(), SLOT(printDecoPlan()));
- connect(mainTab, SIGNAL(requestDiveSiteEdit(QUuid)), this, SLOT(enableDiveSiteEdit(QUuid)));
+ connect(mainTab, SIGNAL(requestDiveSiteEdit(uint32_t)), this, SLOT(enableDiveSiteEdit(uint32_t)));
connect(locationInformation, SIGNAL(informationManagementEnded()), this, SLOT(setDefaultState()));
#ifdef NO_PRINTING
ui.printPlan->hide();
@@ -214,9 +214,8 @@ LocationInformationWidget *MainWindow::locationInformationWidget() {
return qobject_cast<LocationInformationWidget*>(applicationState["EditDiveSite"].topLeft);
}
-void MainWindow::enableDiveSiteEdit(QUuid id) {
- locationInformationWidget()->setLocationName(current_dive->location);
- locationInformationWidget()->setLocationCoords(printGPSCoords(current_dive->latitude.udeg, current_dive->longitude.udeg));
+void MainWindow::enableDiveSiteEdit(uint32_t id) {
+ locationInformationWidget()->setLocationId(id);
setApplicationState("EditDiveSite");
}