From 88078a2219aa2d546c613598016a8f1daa445c99 Mon Sep 17 00:00:00 2001 From: Juho Ervasti Date: Thu, 9 Jan 2025 14:05:11 +0200 Subject: [PATCH 1/2] Merge tool: update manual widget for fields with a default value clause --- src/app/qgsmergeattributesdialog.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/app/qgsmergeattributesdialog.cpp b/src/app/qgsmergeattributesdialog.cpp index 12396c0be474..011f16a2bdb0 100644 --- a/src/app/qgsmergeattributesdialog.cpp +++ b/src/app/qgsmergeattributesdialog.cpp @@ -267,6 +267,11 @@ void QgsMergeAttributesDialog::createTableWidgetContents() currentComboBox->setCurrentIndex( currentComboBox->findData( QStringLiteral( "manual" ) ) ); currentComboBox->blockSignals( false ); } + + const QgsEditorWidgetSetup setup = mFields.at( idx ).editorWidgetSetup(); + + if ( !setup.type().isEmpty() && !setup.isNull() ) + updateManualWidget( j, true ); } } From 028917cc0681a1948c21b412afa52383572e1c36 Mon Sep 17 00:00:00 2001 From: Juho Ervasti Date: Mon, 13 Jan 2025 17:05:58 +0200 Subject: [PATCH 2/2] Check for null setup first --- src/app/qgsmergeattributesdialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/qgsmergeattributesdialog.cpp b/src/app/qgsmergeattributesdialog.cpp index 011f16a2bdb0..c6faed8be5b6 100644 --- a/src/app/qgsmergeattributesdialog.cpp +++ b/src/app/qgsmergeattributesdialog.cpp @@ -270,7 +270,7 @@ void QgsMergeAttributesDialog::createTableWidgetContents() const QgsEditorWidgetSetup setup = mFields.at( idx ).editorWidgetSetup(); - if ( !setup.type().isEmpty() && !setup.isNull() ) + if ( !setup.isNull() && !setup.type().isEmpty() ) updateManualWidget( j, true ); } }