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

Conversation

JuhoErvasti
Copy link
Contributor

@JuhoErvasti JuhoErvasti commented Dec 18, 2024

Apply for widgets which show a key/description instead of the actual values. Addresses part of #59494 (the additional context part, the main part AFAIK is the intended behavior and is meant to be addressed with a "merge policy" feature)

Backport to 3.40 requested.

before:
before

after:
after

- Apply for widgets which show a key/description instead of the actual
  value
@github-actions github-actions bot added this to the 3.42.0 milestone Dec 18, 2024
Copy link

github-actions bot commented Dec 18, 2024

🪟 Windows builds

Download Windows builds of this PR for testing.
Debug symbols for this build are available here.
(Built from commit 69fde6a)

🪟 Windows Qt6 builds

Download Windows Qt6 builds of this PR for testing.
(Built from commit 69fde6a)

@JuhoErvasti JuhoErvasti changed the title Merge features: immediately update widgets for attributes with a default value Merge features: immediately update widgets for attributes with a provider default value Dec 18, 2024
@@ -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 QString widgetType = QgsGui::editorWidgetRegistry()->findBest( mVectorLayer, mFields.at( idx ).name() ).type();

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants