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

Fix multi edit relation reference #57342

Merged
merged 3 commits into from May 23, 2024

Conversation

nirvn
Copy link
Contributor

@nirvn nirvn commented May 4, 2024

Description

This PR fixes an issue when the attribute form mode is set to multi editing whereas relation referencing editor widget value is wrongly marked as "edited" upon opening the attribute form (i.e. prior to actually editing the widget value).

image
Note the wrong "value changed" red button in the feature form upon opening the form

It's a bit of a rabbit hole to follow here, but basically what happens is that the relation referencing editor widget sets the foreign keys value, which is first consumed as a non-found feature as the feature picker model gathers features. Upon having successfully gathered the feature, the model reports that the feature is found. Until now, it was using the feature changed signal, which bubbled back up to the relation referencing editor widget as a "foreign key changed" even though it clearly isn't.

The way around this without a significant refactoring is to add another signal that identifies a feature found state change (vs. using feature changed for both an actual feature values change and a feature values found).

@nirvn nirvn added Attribute Table Bug Either a bug report, or a bug fix. Let's hope for the latter! labels May 4, 2024
@github-actions github-actions bot added this to the 3.38.0 milestone May 4, 2024
Copy link

github-actions bot commented May 4, 2024

🪟 Windows builds ready!

Windows builds of this PR are available for testing here. Debug symbols for this build are available here.

(Built from commit 21fa5cd)

Copy link

The QGIS project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 14 days and is being automatically marked as "stale". If you think this pull request should be merged, please check

  • that all unit tests are passing

  • that all comments by reviewers have been addressed

  • that there is enough information for reviewers, in particular

    • link to any issues which this pull request fixes

    • add a description of workflows which this pull request fixes

    • add screenshots if applicable

  • that you have written unit tests where possible
    In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this pull request.
    If there is no further activity on this pull request, it will be closed in a week.

@github-actions github-actions bot added the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label May 19, 2024
@nirvn nirvn force-pushed the fix_multi_edit_relation_reference branch from 32a063f to 21fa5cd Compare May 22, 2024 09:36
@github-actions github-actions bot removed the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label May 22, 2024
@nyalldawson nyalldawson merged commit 8413982 into qgis:master May 23, 2024
27 of 29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Attribute Table Bug Either a bug report, or a bug fix. Let's hope for the latter!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants