Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions src/qml/qgismobileapp.qml
Original file line number Diff line number Diff line change
Expand Up @@ -1174,17 +1174,23 @@ ApplicationWindow {

Component.onCompleted: {
pointHandler.registerHandler("LocationMarker", (point, type, interactionType) => {
if (!locationMarker.visible || !locationMarker.isOnMapCanvas || interactionType !== "clicked") {
if (!locationMarker.visible || !locationMarker.isOnMapCanvas || (interactionType !== "clicked" && interactionType !== "pressedAndHold")) {
return false;
}
const dx = point.x - locationMarker.screenLocation.x;
const dy = point.y - locationMarker.screenLocation.y;
const distance = Math.sqrt(dx * dx + dy * dy);
if (distance > 25) {
if (type === "stylus" && interactionType === "clicked") {
mainWindow.displayToast(qsTr("Long press on your location marker to show actions"));
return false;
} else if ((type !== "stylus" && interactionType === "clicked") || (type === "stylus" && interactionType === "pressedAndHold")) {
const dx = point.x - locationMarker.screenLocation.x;
const dy = point.y - locationMarker.screenLocation.y;
const distance = Math.sqrt(dx * dx + dy * dy);
if (distance > 25) {
return false;
}
openPieMenu(point);
return true;
}
openPieMenu(point);
return true;
return false;
}, MapCanvasPointHandler.Priority.High);
if (!settings.valueBool("/QField/pieMenuOpenedOnce", false)) {
bubbleText = qsTr("Tap on your location marker\nto show actions");
Expand Down
Loading