-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[ReshapeMapTool] Fix snapping matches with tracing #58779
[ReshapeMapTool] Fix snapping matches with tracing #58779
Conversation
addCurve( new QgsLineString( mapPoints ) ); | ||
int pointBefore = mCaptureCurve.numPoints(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to make it clearer what this is actually doing, could we move all the logic relating to pointBefore/pointAfter and the sync snapping matches into the block which starts with if ( QgsSettingsRegistryCore::settingsDigitizingConvertToCurve->value() )
? As far as I can see this logic ONLY applies now if the curve approximation is happening.
And on that note... if the unsegmentized line ends up with LESS vertices then the segmentized one, won't mSnappingMatches
have too many entries and need to be trimmed? Maybe this whole logic could be simplified down to just:
// sync the snapping matches list
mSnappingMatches.resize( mCaptureCurve.numPoints() )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! Done c3c3ccc
When we need curve de-approximation
So we keep the existing snapping matches
addCurve()
method already update themSnappingMatches
variable so we need to updatepointBefore
variable after theaddCurve()
callFixes #57225