From 8092a99b7c0ebb7e1674ea8cbe544c84d11fa167 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 1329ec4070..0116675fe9 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 e82054edcc..521c92a32e 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) {