diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2015-09-25 14:51:10 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-09-27 06:43:18 -0400 |
commit | 64453893a0d8f88f4c70b5606d133b1acc68d10b (patch) | |
tree | d7d448d202cbce6e9a18cd856fb46198135c1956 /qt-ui/locationinformation.cpp | |
parent | 94d05d1cb6c5a63540a82e32056b89456e494fcb (diff) | |
download | subsurface-64453893a0d8f88f4c70b5606d133b1acc68d10b.tar.gz |
Do not set text on the Location LineEdit
Since the location is only true with a valid uuid, set the
uuid on it, it will search for a valid name and set there.
this fixes a few inconsistencies handling the locations.
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 | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/qt-ui/locationinformation.cpp b/qt-ui/locationinformation.cpp index 29ce1548d..90d7dae6c 100644 --- a/qt-ui/locationinformation.cpp +++ b/qt-ui/locationinformation.cpp @@ -538,6 +538,18 @@ void DiveLocationLineEdit::fixPopupPosition() } } +void DiveLocationLineEdit::setCurrentDiveSiteUuid(uint32_t uuid) +{ + currUuid = uuid; + if(uuid == 0) { + currType = NO_DIVE_SITE; + } + struct dive_site *ds = get_dive_site_by_uuid(uuid); + if(!ds) + clear(); + setText(ds->name); +} + void DiveLocationLineEdit::showPopup() { fixPopupPosition(); |