mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
b766525183
commit
652b78657e
3 changed files with 8 additions and 2 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue