From 9cf8bf0c32a8c18a2847d8da169b89354599fbf5 Mon Sep 17 00:00:00 2001 From: Mathieu Pellerin Date: Thu, 4 Jul 2024 14:19:57 +0700 Subject: [PATCH] Make geofencing digitizing prohibition a project-level setting via qfieldsync --- src/qml/QFieldSettings.qml | 37 ------------------------------------- src/qml/qgismobileapp.qml | 1 + 2 files changed, 1 insertion(+), 37 deletions(-) diff --git a/src/qml/QFieldSettings.qml b/src/qml/QFieldSettings.qml index 1258b3a065..d39a11b8ce 100644 --- a/src/qml/QFieldSettings.qml +++ b/src/qml/QFieldSettings.qml @@ -1335,43 +1335,6 @@ Page { width: 1 } - Label { - text: qsTr("Prevent digitizing while geofencing is in alert mode") - font: Theme.defaultFont - color: Theme.mainTextColor - wrapMode: Text.WordWrap - Layout.fillWidth: true - - MouseArea { - anchors.fill: parent - onClicked: geofencingPreventDigitizingDuringAlert.toggle() - } - } - - QfSwitch { - id: geofencingPreventDigitizingDuringAlert - Layout.preferredWidth: implicitContentWidth - Layout.alignment: Qt.AlignTop - checked: positioningSettings.geofencingPreventDigitizingDuringAlert - onCheckedChanged: { - positioningSettings.geofencingPreventDigitizingDuringAlert = checked; - } - } - - Label { - text: qsTr("When enabled, the digitizing of new features will be blocked if a project's geofencing is active and the current position triggers an alert.") - font: Theme.tipFont - color: Theme.secondaryTextColor - - wrapMode: Text.WordWrap - Layout.fillWidth: true - } - - Item { - // empty cell in grid layout - width: 1 - } - Label { text: qsTr("Antenna height compensation") font: Theme.defaultFont diff --git a/src/qml/qgismobileapp.qml b/src/qml/qgismobileapp.qml index 6abac0d6bf..f7872caee1 100644 --- a/src/qml/qgismobileapp.qml +++ b/src/qml/qgismobileapp.qml @@ -3373,6 +3373,7 @@ ApplicationWindow { } layoutListInstantiator.model.reloadModel(); geofencer.applyProjectSettings(qgisProject); + positioningSettings.geofencingPreventDigitizingDuringAlert = iface.readProjectBoolEntry("qfieldsync", "/geofencingPreventDigitizing", false); } function onSetMapExtent(extent) {