From b8092c07a4b4d7715d825641e458be5fa56972d6 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Mon, 1 Jun 2015 16:58:23 -0300 Subject: Create a new DiveSite when user clicks on add Also reorganized a bit of the code, and renamed a few misleading methods. [Dirk Hohndel: remove some C++11 code] Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/mainwindow.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'qt-ui/mainwindow.cpp') diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 9fa1a81d1..3abb230c4 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -216,7 +216,7 @@ void MainWindow::on_actionManage_dive_sites_triggered() { } void MainWindow::enableDiveSiteEdit(uint32_t id) { - locationInformationWidget()->setLocationId(displayed_dive.dive_site_uuid); + locationInformationWidget()->setCurrentDiveSiteByUuid(id); setApplicationState("EditDiveSite"); } @@ -404,7 +404,7 @@ void MainWindow::cleanUpEmpty() information()->updateDiveInfo(true); graphics()->setEmptyState(); dive_list()->reload(DiveTripModel::TREE); - locationInformationWidget()->setLocationId(0); + locationInformationWidget()->setCurrentDiveSiteByUuid(0); globe()->reload(); if (!existing_filename) setTitle(MWTF_DEFAULT); @@ -632,7 +632,7 @@ void MainWindow::setupForAddAndPlan(const char *model) // setup the dive cylinders DivePlannerPointsModel::instance()->clear(); DivePlannerPointsModel::instance()->setupCylinders(); - locationInformationWidget()->setLocationId(0); + locationInformationWidget()->setCurrentDiveSiteByUuid(0); } void MainWindow::on_actionReplanDive_triggered() -- cgit v1.2.3-70-g09d2