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 return value of addTopologicalPoints(QgsGeometry) #43854

Merged
merged 3 commits into from
Jul 8, 2021

Conversation

gacarrillor
Copy link
Member

@gacarrillor gacarrillor commented Jun 22, 2021

QgsVectorLayerEditUtils.addTopologicalPoints(QgsGeometry) iterates QgsGeometry vertices. It's currently returning a 2 (2: No vertex added) if at least one point wasn't added. Instead, it should return 0 (0: Success) if at least one point was added.

image

So, I'm taking the same logic than in addTopologicalPoints(QgsPointSequence) to fix such behavior.

I'll add some tests for that.

@github-actions github-actions bot added this to the 3.22.0 milestone Jun 22, 2021
@gacarrillor gacarrillor changed the title Fix return value of addTopologicalPoints(QgsGeometry) [WIP] Fix return value of addTopologicalPoints(QgsGeometry) Jun 24, 2021
@gacarrillor gacarrillor changed the title [WIP] Fix return value of addTopologicalPoints(QgsGeometry) Fix return value of addTopologicalPoints(QgsGeometry) Jun 29, 2021
@lbartoletti
Copy link
Member

Thanks @gacarrillor I'll try to review it this week.

@gacarrillor gacarrillor force-pushed the addtopologicalpoints_results branch from cc8cf03 to 92231d7 Compare July 6, 2021 02:22
@lbartoletti lbartoletti self-requested a review July 6, 2021 04:22
Copy link
Member

@lbartoletti lbartoletti left a comment

Choose a reason for hiding this comment

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

@gacarrillor
Copy link
Member Author

LGTM @gacarrillor

Thanks for your review @lbartoletti!

@m-kuhn m-kuhn merged commit f083876 into qgis:master Jul 8, 2021
@gacarrillor gacarrillor deleted the addtopologicalpoints_results branch July 8, 2021 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants