diff options
Diffstat (limited to 'qt-models/maplocationmodel.cpp')
-rw-r--r-- | qt-models/maplocationmodel.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/qt-models/maplocationmodel.cpp b/qt-models/maplocationmodel.cpp index 57fc76179..3aad02980 100644 --- a/qt-models/maplocationmodel.cpp +++ b/qt-models/maplocationmodel.cpp @@ -48,6 +48,8 @@ QVariant MapLocation::getRole(int role) const QString("qrc:///dive-location-marker-icon"); case Roles::RoleZ: return m_selected ? 1 : 0; + case Roles::RoleIsSelected: + return QVariant::fromValue(m_selected); default: return QVariant(); } @@ -105,6 +107,7 @@ QHash<int, QByteArray> MapLocationModel::roleNames() const roles[MapLocation::Roles::RoleName] = "name"; roles[MapLocation::Roles::RolePixmap] = "pixmap"; roles[MapLocation::Roles::RoleZ] = "z"; + roles[MapLocation::Roles::RoleIsSelected] = "isSelected"; return roles; } |