diff options
-rw-r--r-- | qt-ui/maintab.cpp | 5 | ||||
-rw-r--r-- | qt-ui/maintab.h | 2 | ||||
-rw-r--r-- | qt-ui/mainwindow.cpp | 1 |
3 files changed, 8 insertions, 0 deletions
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(); |