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:
Berthold Stoeger 2019-08-30 18:09:37 +02:00 committed by Dirk Hohndel
parent b766525183
commit 652b78657e
3 changed files with 8 additions and 2 deletions

View file

@ -56,7 +56,7 @@ Item {
anchorPoint.x: 0
anchorPoint.y: mapItemImage.height
coordinate: model.coordinate
z: mapHelper.model.isSelected(model.divesite) ? mapHelper.model.count - 1 : 0
z: model.z
sourceItem: Image {
id: mapItemImage
source: model.pixmap