summaryrefslogtreecommitdiffstats
path: root/qt-models/maplocationmodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-models/maplocationmodel.cpp')
-rw-r--r--qt-models/maplocationmodel.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/qt-models/maplocationmodel.cpp b/qt-models/maplocationmodel.cpp
index e01b46621..5ae3609e3 100644
--- a/qt-models/maplocationmodel.cpp
+++ b/qt-models/maplocationmodel.cpp
@@ -101,10 +101,15 @@ quint32 MapLocationModel::selectedUuid()
void MapLocationModel::setSelectedUuid(quint32 uuid)
{
m_selectedUuid = uuid;
+ emit selectedLocationChanged(getMapLocationForUuid(uuid));
+}
+
+MapLocation *MapLocationModel::getMapLocationForUuid(quint32 uuid)
+{
MapLocation *location = NULL;
foreach(location, m_mapLocations) {
if (location->getRole(MapLocation::Roles::RoleUuid) == uuid)
break;
}
- emit selectedLocationChanged(location);
+ return location;
}