Skip to content

fix(QgsMapToolCapture): Allow snapping point with different crs#60456

Merged
nyalldawson merged 1 commit intoqgis:masterfrom
lbartoletti:fix_59792
Feb 6, 2025
Merged

fix(QgsMapToolCapture): Allow snapping point with different crs#60456
nyalldawson merged 1 commit intoqgis:masterfrom
lbartoletti:fix_59792

Conversation

@lbartoletti
Copy link
Copy Markdown
Member

Description

fixes #59792

@github-actions github-actions Bot added this to the 3.42.0 milestone Feb 5, 2025
@lbartoletti lbartoletti self-assigned this Feb 5, 2025
@lbartoletti lbartoletti added Requires Tests! Waiting on the submitter to add unit tests before eligible for merging Bug Either a bug report, or a bug fix. Let's hope for the latter! Digitizing Related to feature digitizing map tools or functionality backport queued_ltr_backports Queued Backports backport release-3_40 labels Feb 5, 2025
@nicogodet nicogodet removed the backport queued_ltr_backports Queued Backports label Feb 5, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 5, 2025

🪟 Windows builds

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

🪟 Windows Qt6 builds

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

@lbartoletti lbartoletti removed the Requires Tests! Waiting on the submitter to add unit tests before eligible for merging label Feb 5, 2025
Comment thread src/gui/maptools/qgsmaptoolcapture.cpp
@nyalldawson nyalldawson merged commit 79e4ccb into qgis:master Feb 6, 2025
@nirvn
Copy link
Copy Markdown
Contributor

nirvn commented Feb 6, 2025

@lbartoletti , nice one.

@agiudiceandrea
Copy link
Copy Markdown
Member

Please have a look at the regression reported at #60868 which may be related with this PR.

Comment on lines +674 to +677
if ( sourceLayer->crs() != vlayer->crs() )
{
layerPoint = toLayerCoordinates( vlayer, layerPoint );
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Doesn't this extra transformation cause #60927 & #60868 ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, but fixes #59792 ... When I found a for one, it's adding regression to another one...
Was AFK last days, and working on it since this morning, and sometimes I would expect that projection doesn't exist...
Anyway, I found other strange logic in QgsMapToolCapture. I hope to find a solution soon...

@agiudiceandrea
Copy link
Copy Markdown
Member

Another issue report probably related to this PR: #60989.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Either a bug report, or a bug fix. Let's hope for the latter! Digitizing Related to feature digitizing map tools or functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Z-Coordinate not transferred when snapping between features in different coordinate systems

6 participants