summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-02-13 23:49:05 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-02-13 23:50:31 -0800
commitf81e2c111d9c563a78e62c3bae64bec07c052ec0 (patch)
tree2d343699fb50e26b969c4dead21e8a10ff6f7b8f /qt-ui
parent6820b13bd58ee382a21215e84427dfd690857dd6 (diff)
downloadsubsurface-f81e2c111d9c563a78e62c3bae64bec07c052ec0.tar.gz
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 <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/maintab.cpp5
-rw-r--r--qt-ui/maintab.h2
-rw-r--r--qt-ui/mainwindow.cpp1
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();