Skip to content

Commit

Permalink
Try to fix pinching gesture when a finger starts on a bookmark marker
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Jun 27, 2024
1 parent ddfc566 commit a0c000a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/qml/BookmarkHighlight.qml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@ import Theme 1.0

Repeater {
id: bookmarkHighlight

property alias interactive: bookmarkRenderer.interactive
property MapSettings mapSettings

model: qfieldSettings.showBookmarks ? bookmarkModel : undefined

delegate: BookmarkRenderer {
id: bookmarkRenderer

mapSettings: bookmarkHighlight.mapSettings
geometryWrapper.qgsGeometry: model.BookmarkPoint
geometryWrapper.crs: model.BookmarkCrs
Expand Down
3 changes: 3 additions & 0 deletions src/qml/BookmarkRenderer.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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: ''
Expand Down Expand Up @@ -124,6 +126,7 @@ Item {
}

MouseArea {
enabled: bookmarkRenderer.interactive
anchors.fill: bookmark
onClicked: {
displayToast(qsTr('Bookmark: %1').arg(bookmarkRenderer.bookmarkName));
Expand Down
1 change: 1 addition & 0 deletions src/qml/MapCanvas.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/qml/qgismobileapp.qml
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,7 @@ ApplicationWindow {

BookmarkHighlight {
id: bookmarkHighlight
interactive: !mapCanvasMap.dragged
mapSettings: mapCanvas.mapSettings
}

Expand Down

0 comments on commit a0c000a

Please sign in to comment.