From f1020a02ce3c17cfce52e55cb4e043fbfa0d76cb Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Mon, 24 Jul 2017 22:50:18 +0300 Subject: mapwidget.qml: store the selected dives count in "nSelectedDives" Different actions might be performed depending on the count of selected dives - e.g. deep zoom only for a single selected dive. Signed-off-by: Lubomir I. Ivanov --- mobile-widgets/qml/MapWidget.qml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'mobile-widgets/qml') diff --git a/mobile-widgets/qml/MapWidget.qml b/mobile-widgets/qml/MapWidget.qml index 647754223..a8eb7550e 100644 --- a/mobile-widgets/qml/MapWidget.qml +++ b/mobile-widgets/qml/MapWidget.qml @@ -5,6 +5,8 @@ import QtPositioning 5.3 import org.subsurfacedivelog.mobile 1.0 Item { + property int nSelectedDives: 0 + Plugin { id: mapPlugin name: "esri" @@ -15,7 +17,7 @@ Item { map: map onSelectedDivesChanged: { // 'list' contains a list of dive list indexes - console.log("onSelectedDivesChanged: " + list.length); + nSelectedDives = list.length } } -- cgit v1.2.3-70-g09d2