From 075626c8275b08274915d4f1d84f32bdc2d2a98c Mon Sep 17 00:00:00 2001 From: Mathieu Pellerin Date: Thu, 27 Jun 2024 14:39:00 +0700 Subject: [PATCH] Try to fix pinching gesture when a finger starts on a bookmark marker --- src/qml/BookmarkHighlight.qml | 5 +++++ src/qml/BookmarkRenderer.qml | 3 +++ src/qml/MapCanvas.qml | 1 + src/qml/qgismobileapp.qml | 1 + 4 files changed, 10 insertions(+) diff --git a/src/qml/BookmarkHighlight.qml b/src/qml/BookmarkHighlight.qml index 4543e9ea4c..64edba28c3 100644 --- a/src/qml/BookmarkHighlight.qml +++ b/src/qml/BookmarkHighlight.qml @@ -7,11 +7,16 @@ import Theme 1.0 Repeater { id: bookmarkHighlight + + property bool interactive: true property MapSettings mapSettings model: qfieldSettings.showBookmarks ? bookmarkModel : undefined delegate: BookmarkRenderer { + id: bookmarkRenderer + + interactive: bookmarkHighlight.interactive mapSettings: bookmarkHighlight.mapSettings geometryWrapper.qgsGeometry: model.BookmarkPoint geometryWrapper.crs: model.BookmarkCrs diff --git a/src/qml/BookmarkRenderer.qml b/src/qml/BookmarkRenderer.qml index 783ed86489..84040035ee 100644 --- a/src/qml/BookmarkRenderer.qml +++ b/src/qml/BookmarkRenderer.qml @@ -9,6 +9,8 @@ import Theme 1.0 Item { id: bookmarkRenderer + property bool interactive: true + property var bookmarkIndex: undefined property string bookmarkId: '' property string bookmarkName: '' @@ -124,6 +126,7 @@ Item { } MouseArea { + enabled: bookmarkRenderer.interactive anchors.fill: bookmark onClicked: { displayToast(qsTr('Bookmark: %1').arg(bookmarkRenderer.bookmarkName)); diff --git a/src/qml/MapCanvas.qml b/src/qml/MapCanvas.qml index 89ae7e57e8..c02f55c714 100644 --- a/src/qml/MapCanvas.qml +++ b/src/qml/MapCanvas.qml @@ -33,6 +33,7 @@ Item { property bool interactive: true property bool hovered: false + property bool dragged: mainDragHandler.active || stylusDragHandler property bool pinched: pinchHandler.active property bool freehandDigitizing: false property bool isMapRotationEnabled: false diff --git a/src/qml/qgismobileapp.qml b/src/qml/qgismobileapp.qml index 75b936835a..a8b7bbf5ba 100644 --- a/src/qml/qgismobileapp.qml +++ b/src/qml/qgismobileapp.qml @@ -713,6 +713,7 @@ ApplicationWindow { BookmarkHighlight { id: bookmarkHighlight + interactive: !mapCanvasMap.dragged mapSettings: mapCanvas.mapSettings }