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 geometry validity check preventing saving of changes after removing problematic feature(s) #60263

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

Conversation

nirvn
Copy link
Contributor

@nirvn nirvn commented Jan 24, 2025

Description

This PR fixes #59688 whereas logic was missing to ensure that delete feature(s) with problematic geometry would allow for the remaining valid changes to be saved during an editing session.

@github-actions github-actions bot added this to the 3.42.0 milestone Jan 24, 2025
Copy link

github-actions bot commented Jan 24, 2025

🪟 Windows builds

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

🪟 Windows Qt6 builds

Download Windows Qt6 builds of this PR for testing.
(Built from commit 7469c7c)

@@ -133,12 +133,16 @@ void QgsGeometryValidationService::onGeometryChanged( QgsVectorLayer *layer, Qgs

void QgsGeometryValidationService::onFeatureDeleted( QgsVectorLayer *layer, QgsFeatureId fid )
{
mLayerChecks[layer].singleFeatureCheckErrors.remove( fid );
Copy link
Collaborator

Choose a reason for hiding this comment

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

There's a few QHash lookups to mLayerChecks[layer] in this method -- how about retrieving the value once as a reference, and reusing throughout?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@nyalldawson , addressed, thanks.

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.

Unable to save after error in Geometry Validation
2 participants