summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2015-05-26 17:10:46 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-05-26 21:47:21 -0700
commitb7ec57bdeff11d4639397efffd693eeafe6a0f55 (patch)
treee7046910c91a1c78ef1843d72e2774ce75002d4d /qt-ui
parent609688b489ac30fd919c18a7aae1df172570b408 (diff)
downloadsubsurface-b7ec57bdeff11d4639397efffd693eeafe6a0f55.tar.gz
Show the correct dive_site on the manage combobox
When triggering the dive_site management, we need to get the uuid that was send to us and set it as the current dive_site on the combobox, the dialog can fill all required info for us. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/locationinformation.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/qt-ui/locationinformation.cpp b/qt-ui/locationinformation.cpp
index 3ee9dd746..b433805e0 100644
--- a/qt-ui/locationinformation.cpp
+++ b/qt-ui/locationinformation.cpp
@@ -87,6 +87,13 @@ void LocationInformationWidget::setLocationId(uint32_t uuid)
return;
displayed_dive_site = *currentDs;
+ if (ui.currentLocation->currentText() != displayed_dive_site.name) {
+ // this will trigger setCurrentDiveSite again, and thus,
+ // will gethere with the correct uuid.
+ ui.currentLocation->setCurrentText(displayed_dive_site.name);
+ return;
+ }
+
if (displayed_dive_site.name)
ui.diveSiteName->setText(displayed_dive_site.name);
else