Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge features: immediately update widgets for attributes with a provider default value #59960

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/app/qgsmergeattributesdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,15 @@ void QgsMergeAttributesDialog::createTableWidgetContents()
currentComboBox->setCurrentIndex( currentComboBox->findData( QStringLiteral( "manual" ) ) );
currentComboBox->blockSignals( false );
}

const QString widgetType = QgsGui::editorWidgetRegistry()->findBest( mVectorLayer, mFields.at( idx ).name() ).type();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be field.editorWidgetSetup().type() instead? Iirc findBest is using some heuristics while we can use a configuration here.


const QStringList updateWidgetFor = QStringList() << QStringLiteral( "ValueMap" )
Copy link
Member

@m-kuhn m-kuhn Dec 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the reason for this hardcoded list of widget types?

<< QStringLiteral( "ValueRelation" )
<< QStringLiteral( "RelationReference" );

if ( updateWidgetFor.contains( widgetType ) )
updateManualWidget( j, true );
}
}

Expand Down
Loading