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

[vector layer] Fix newly-added features in the edit buffer prior to adding a new attribute will not save the new attribute's values #60226

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

nirvn
Copy link
Contributor

@nirvn nirvn commented Jan 22, 2025

Description

This PR fixes #59783 , a pretty serious data loss scenario with regards to the way the vector layer edit buffer handles newly added features followed by newly added attributes.

Basically, when adding a new feature via attribute table, the feature would come with a defined fields(), which would then become outdated when a newly-added attribute was added during the session. That meant that if a user would do the following:

1/ add a new feature
2/ add a new attribute
3/ edit the new attribute from the newly-added feature
4/ commit

The user would lose the data added in step 3.

…dding a new attribute will not save the new attribute's values

(fixes qgis#59783)
@github-actions github-actions bot added this to the 3.42.0 milestone Jan 22, 2025
Copy link

github-actions bot commented Jan 22, 2025

🪟 Windows builds

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

🪟 Windows Qt6 builds

Download Windows Qt6 builds of this PR for testing.
(Built from commit 7ff588f)

@nirvn nirvn force-pushed the add_attribute_edit_value_fix branch from 8dfbd73 to 00843e9 Compare January 23, 2025 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Data loss for new rows if a column added after row in attribute table
1 participant