From 652b78657ebe18ff101d3f6cd2ac9f3458db1881 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Fri, 30 Aug 2019 18:09:37 +0200 Subject: 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 --- map-widget/qml/MapWidget.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'map-widget') diff --git a/map-widget/qml/MapWidget.qml b/map-widget/qml/MapWidget.qml index fb5545e88..8116163cf 100644 --- a/map-widget/qml/MapWidget.qml +++ b/map-widget/qml/MapWidget.qml @@ -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 -- cgit v1.2.3-70-g09d2