From 5ea702199bba685e78c9592b4016dc3afed12833 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Mon, 24 Jul 2017 17:00:06 +0300 Subject: maplocationmodel: make setSelectedUuid() accept "fromClick" flag The idea of this flag is to be able to only to emit the selectedLocationChanged() signal when the user clicked on the map (fromClick == true). MapWidgetHelper::selectedLocationChanged() listens for this signal and only then it will select nearby dives based on a "small-cicle". If "fromClick" is false, it's the backend or the dive list that updated the selection and MapWidgetHelper::selectedLocationChanged() should no be called. Signed-off-by: Lubomir I. Ivanov --- mobile-widgets/qml/MapWidget.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mobile-widgets') diff --git a/mobile-widgets/qml/MapWidget.qml b/mobile-widgets/qml/MapWidget.qml index 38c8fd081..34731e490 100644 --- a/mobile-widgets/qml/MapWidget.qml +++ b/mobile-widgets/qml/MapWidget.qml @@ -60,7 +60,7 @@ Item { MouseArea { anchors.fill: parent onClicked: { - mapHelper.model.selectedUuid = model.uuid + mapHelper.model.setSelectedUuid(model.uuid, true) mapItemImageAnimation.restart() } } @@ -106,12 +106,12 @@ Item { } function centerOnMapLocation(mapLocation) { - mapHelper.model.selectedUuid = mapLocation.uuid + mapHelper.model.setSelectedUuid(mapLocation.uuid, false) animateMapZoomIn(mapLocation.coordinate) } function deselectMapLocation() { - mapHelper.model.selectedUuid = 0 + mapHelper.model.setSelectedUuid(0, false) animateMapZoomOut() } } -- cgit v1.2.3-70-g09d2