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>
This commit is contained in:
Tomaz Canabrava 2015-05-26 17:10:46 -03:00 committed by Dirk Hohndel
parent 609688b489
commit b7ec57bdef

View file

@ -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