maplocationmodel: use READ method selectedUuid

Also emit the selectedUuidChanged signal.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This commit is contained in:
Lubomir I. Ivanov 2017-07-27 23:07:37 +03:00 committed by Dirk Hohndel
parent 2dea6f5146
commit 0955a5b36a
2 changed files with 9 additions and 1 deletions

View file

@ -117,10 +117,16 @@ void MapLocationModel::setSelectedUuid(QVariant uuid, QVariant fromClick)
{
m_selectedUuid = qvariant_cast<quint32>(uuid);
const bool fromClickBool = qvariant_cast<bool>(fromClick);
emit selectedUuidChanged();
if (fromClickBool)
emit selectedLocationChanged(getMapLocationForUuid(m_selectedUuid));
}
quint32 MapLocationModel::selectedUuid()
{
return m_selectedUuid;
}
MapLocation *MapLocationModel::getMapLocationForUuid(quint32 uuid)
{
MapLocation *location = NULL;