summaryrefslogtreecommitdiffstats
path: root/mobile-widgets
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2017-07-24 17:00:06 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-07-28 07:31:11 -0700
commit5ea702199bba685e78c9592b4016dc3afed12833 (patch)
treed6d968e0e791f0504ccaaf559a03f7db36f30bf7 /mobile-widgets
parent747f3d8cab5c9021a2f3f142e06ee3beaef164e8 (diff)
downloadsubsurface-5ea702199bba685e78c9592b4016dc3afed12833.tar.gz
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 <neolit123@gmail.com>
Diffstat (limited to 'mobile-widgets')
-rw-r--r--mobile-widgets/qml/MapWidget.qml6
1 files changed, 3 insertions, 3 deletions
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()
}
}