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

Allow the Trim/Extend Tool to keep the reference line for multiple trim/extend actions #59676

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

Conversation

YoannQDQ
Copy link
Contributor

Description

Pressing Ctrl or Shift while trimming/extending a feature now keeps the reference feature.
Also fix the rubber band display when the layer crs != canvas crs.

trimextend

@github-actions github-actions bot added this to the 3.42.0 milestone Nov 30, 2024
@YoannQDQ YoannQDQ added Feature Digitizing Related to feature digitizing map tools or functionality labels Nov 30, 2024
Copy link

github-actions bot commented Dec 1, 2024

🪟 Windows builds

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

🪟 Windows Qt6 builds

Download Windows Qt6 builds of this PR for testing.
(Built from commit 19b8224)

@baswein
Copy link
Contributor

baswein commented Dec 2, 2024

Thanks for this amazing upgrade!

I just added a couple of semi related feature requests.
One that asks for an infinite line rubber band. #59683
In my ignorance I imagine this would be fairly straight forward as we already do it in a lot of places in QGIS.
And a much more involved one that suggests the ability to select multiple target segments.
#59685
While that feature is a long shot it would likely require either the ctrl or shift key to be used and it seems that you are utilizing both of them for this feature which makes me think we should reserve one of them for future features and options.

Also I think we should upgrade the tool tip help text to identify the modifier and that segment snapping is required to use the tool.
I'm happy to do that as a separate pull request as it is within my limited capabilities.

@lbartoletti lbartoletti self-assigned this Dec 2, 2024
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.

Wonderful! I'd never taken the time to do that, and yet it was just a few lines of code! Many thanks.
Please can you add tests?

@lbartoletti lbartoletti added the Requires Tests! Waiting on the submitter to add unit tests before eligible for merging label Dec 2, 2024
@agiudiceandrea agiudiceandrea added the Needs Documentation When merging a labeled PR, an issue will be created in the Doc repo. label Dec 2, 2024
@qgis-bot
Copy link
Collaborator

qgis-bot commented Dec 2, 2024

@YoannQDQ
This pull request has been tagged as requiring documentation.

A documentation ticket will be opened at https://github.com/qgis/QGIS-Documentation when this PR is merged.

Please update the description (not the comments) with helpful description and screenshot to help the work from documentors.
Also, any commit having [needs-doc] or [Needs Documentation] in will see its message pushed to the issue, so please be as verbose as you can.

Thank you!

std::unique_ptr<QgsMapMouseEvent> event( new QgsMapMouseEvent(
mCanvas,
QEvent::MouseMove,
QPoint( std::round( pt.x() ), std::round( pt.y() ) )
Copy link
Member

Choose a reason for hiding this comment

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

You have to cas to an integer. I guess, that you could replace std::round by static_cast.

@lbartoletti lbartoletti removed the Requires Tests! Waiting on the submitter to add unit tests before eligible for merging label Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Digitizing Related to feature digitizing map tools or functionality Feature Needs Documentation When merging a labeled PR, an issue will be created in the Doc repo.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow the Trim/Extend Tool to keep the reference line for multiple trim/extend actions
5 participants