From 4ba6653febdaf61e89a42ec8d60dd96f4e5a1367 Mon Sep 17 00:00:00 2001 From: Mathieu Pellerin Date: Tue, 12 Nov 2024 12:32:22 +0700 Subject: [PATCH] When setting up our tracking feature, we avoid saving at all times, make relations accept that reality --- .../editorwidgets/relationeditors/ordered_relation_editor.qml | 2 +- src/qml/editorwidgets/relationeditors/relation_editor.qml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qml/editorwidgets/relationeditors/ordered_relation_editor.qml b/src/qml/editorwidgets/relationeditors/ordered_relation_editor.qml index b33b1a7506..de0f9ba6dc 100644 --- a/src/qml/editorwidgets/relationeditors/ordered_relation_editor.qml +++ b/src/qml/editorwidgets/relationeditors/ordered_relation_editor.qml @@ -131,7 +131,7 @@ EditorWidgetBase { repeat: false onTriggered: { - let saved = form.state === 'Add' ? save() : true; + let saved = form.state === 'Add' ? !form.setupOnly && save() : true; if (ProjectUtils.transactionMode(qgisProject) !== Qgis.TransactionMode.Disabled) { // When a transaction mode is enabled, we must fallback to saving the parent feature to have provider-side issues if (!saved) { diff --git a/src/qml/editorwidgets/relationeditors/relation_editor.qml b/src/qml/editorwidgets/relationeditors/relation_editor.qml index 72498cbdd4..f910ac4631 100644 --- a/src/qml/editorwidgets/relationeditors/relation_editor.qml +++ b/src/qml/editorwidgets/relationeditors/relation_editor.qml @@ -141,7 +141,7 @@ EditorWidgetBase { repeat: false onTriggered: { - let saved = form.state === 'Add' ? save() : true; + let saved = form.state === 'Add' ? !form.setupOnly && save() : true; if (ProjectUtils.transactionMode(qgisProject) !== Qgis.TransactionMode.Disabled) { // When a transaction mode is enabled, we must fallback to saving the parent feature to have provider-side issues if (!saved) {