From f81e2c111d9c563a78e62c3bae64bec07c052ec0 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 13 Feb 2015 23:49:05 -0800 Subject: When updating the dive site name, show this on the maintab If we accept a change on the dive site management screen, it needs to be reflected on the Dive notes tab right away. Signed-off-by: Dirk Hohndel --- qt-ui/maintab.cpp | 5 +++++ qt-ui/maintab.h | 2 ++ qt-ui/mainwindow.cpp | 1 + 3 files changed, 8 insertions(+) (limited to 'qt-ui') diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index 86a8965f5..b78280d7a 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -395,6 +395,11 @@ bool MainTab::isEditing() return editMode != NONE; } +void MainTab::showLocation() +{ + ui.location->setText(get_dive_location(&displayed_dive)); +} + void MainTab::updateDiveInfo(bool clear) { // don't execute this while adding / planning a dive diff --git a/qt-ui/maintab.h b/qt-ui/maintab.h index aebd51073..8869b068e 100644 --- a/qt-ui/maintab.h +++ b/qt-ui/maintab.h @@ -93,6 +93,8 @@ slots: void photoDoubleClicked(const QString filePath); void removeSelectedPhotos(); void prepareDiveSiteEdit(); + void showLocation(); + private: Ui::MainTab ui; WeightModel *weightModel; diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 1f4c2d7de..56f885409 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -114,6 +114,7 @@ MainWindow::MainWindow() : QMainWindow(), 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())); + connect(locationInformation, SIGNAL(informationManagementEnded()), information(), SLOT(showLocation())); #ifdef NO_PRINTING ui.printPlan->hide(); -- cgit v1.2.3-70-g09d2