From d6e56b0954fa9f9d30a18290c1aa21cb50d80f2f Mon Sep 17 00:00:00 2001 From: Mathieu Pellerin Date: Sat, 16 Dec 2023 10:23:34 +0700 Subject: [PATCH] Fix confusing 'snap to 45 degree' toast when opening QField --- src/qml/qgismobileapp.qml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/qml/qgismobileapp.qml b/src/qml/qgismobileapp.qml index b7aba02da6..91b2eb22c7 100644 --- a/src/qml/qgismobileapp.qml +++ b/src/qml/qgismobileapp.qml @@ -1474,7 +1474,8 @@ ApplicationWindow { checkable: true checked: snapToCommonAngleButton.isSnapToCommonAngleRelative - onCheckedChanged: { + + onTriggered: { snapToCommonAngleButton.isSnapToCommonAngleRelative = checked; settings.setValue( "/QField/Digitizing/SnapToCommonAngleIsRelative", snapToCommonAngleButton.isSnapToCommonAngleRelative ); } @@ -1495,9 +1496,10 @@ ApplicationWindow { leftPadding: 10 checkable: true - enabled: !checked checked: modelData === snapToCommonAngleButton.snapToCommonAngleDegrees - onCheckedChanged: { + enabled: modelData !== snapToCommonAngleButton.snapToCommonAngleDegrees + + onTriggered: { if ( !checked ) { return; }