diff --git a/src/qml/editorwidgets/relationeditors/ordered_relation_editor.qml b/src/qml/editorwidgets/relationeditors/ordered_relation_editor.qml index b668476d17..b33b1a7506 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 = save(); + let saved = form.state === 'Add' ? 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) { @@ -375,6 +375,14 @@ EditorWidgetBase { } } + BusyIndicator { + id: busyIndicator + anchors.centerIn: parent + width: 36 + height: 36 + running: orderedRelationModel.isLoading + } + Dialog { id: deleteDialog parent: mainWindow.contentItem @@ -414,14 +422,6 @@ EditorWidgetBase { } } - BusyIndicator { - id: busyIndicator - anchors.centerIn: parent - width: 36 - height: 36 - running: orderedRelationModel.isLoading - } - EmbeddedFeatureForm { id: embeddedPopup diff --git a/src/qml/editorwidgets/relationeditors/relation_editor.qml b/src/qml/editorwidgets/relationeditors/relation_editor.qml index 4bf95d3aee..72498cbdd4 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 = save(); + let saved = form.state === 'Add' ? 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) { @@ -175,6 +175,14 @@ EditorWidgetBase { } } } + + BusyIndicator { + id: busyIndicator + anchors.centerIn: parent + width: 36 + height: 36 + running: relationEditorModel.isLoading + } } Component { @@ -320,14 +328,6 @@ EditorWidgetBase { } } - BusyIndicator { - id: busyIndicator - anchors.centerIn: parent - width: 36 - height: 36 - running: relationEditorModel.isLoading - } - EmbeddedFeatureForm { id: embeddedPopup