summaryrefslogtreecommitdiffstats
path: root/qt-models/maplocationmodel.cpp
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2017-07-27 23:07:37 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-07-28 07:31:11 -0700
commit0955a5b36a5d67454826a0a2fe58d609486faaaa (patch)
tree0b33e6157cb6fe3f842a79e58efb4c20b21b7793 /qt-models/maplocationmodel.cpp
parent2dea6f514696ea8e740c9028b7426f958bfb2c96 (diff)
downloadsubsurface-0955a5b36a5d67454826a0a2fe58d609486faaaa.tar.gz
maplocationmodel: use READ method selectedUuid
Also emit the selectedUuidChanged signal. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Diffstat (limited to 'qt-models/maplocationmodel.cpp')
-rw-r--r--qt-models/maplocationmodel.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/qt-models/maplocationmodel.cpp b/qt-models/maplocationmodel.cpp
index 152688367..3a8db96d4 100644
--- a/qt-models/maplocationmodel.cpp
+++ b/qt-models/maplocationmodel.cpp
@@ -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;