mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
94d05d1cb6
commit
64453893a0
3 changed files with 21 additions and 6 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue