diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2015-05-26 17:10:46 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-05-26 21:47:21 -0700 |
commit | b7ec57bdeff11d4639397efffd693eeafe6a0f55 (patch) | |
tree | e7046910c91a1c78ef1843d72e2774ce75002d4d /qt-ui/locationinformation.cpp | |
parent | 609688b489ac30fd919c18a7aae1df172570b408 (diff) | |
download | subsurface-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/locationinformation.cpp')
-rw-r--r-- | qt-ui/locationinformation.cpp | 7 |
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 |