summaryrefslogtreecommitdiffstats
path: root/qt-models/maplocationmodel.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-08-30 18:09:37 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-09-06 11:48:47 -0700
commit652b78657ebe18ff101d3f6cd2ac9f3458db1881 (patch)
tree10df535833370de16c1ff056af6806d533f8ed55 /qt-models/maplocationmodel.h
parentb7665251835cb6786c3b268fd0d04d69dccf36ed (diff)
downloadsubsurface-652b78657ebe18ff101d3f6cd2ac9f3458db1881.tar.gz
Map: calculate the z value in the model
Since not fully reloading the map on selection change, the selected sites were not moved to the top. Not calculating the z-value in QML, but making it a simple model property helps. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models/maplocationmodel.h')
-rw-r--r--qt-models/maplocationmodel.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/qt-models/maplocationmodel.h b/qt-models/maplocationmodel.h
index 3335822e2..4b2066186 100644
--- a/qt-models/maplocationmodel.h
+++ b/qt-models/maplocationmodel.h
@@ -22,6 +22,7 @@ public:
static const char *PROPERTY_NAME_DIVESITE;
static const char *PROPERTY_NAME_NAME;
static const char *PROPERTY_NAME_PIXMAP;
+ static const char *PROPERTY_NAME_Z;
explicit MapLocation();
explicit MapLocation(struct dive_site *ds, QGeoCoordinate coord, QString name, bool selected);
@@ -37,7 +38,8 @@ public:
RoleDivesite = Qt::UserRole + 1,
RoleCoordinate,
RoleName,
- RolePixmap
+ RolePixmap,
+ RoleZ
};
private: