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

Layout better node item creation #59239

Merged
merged 6 commits into from
Dec 12, 2024

Conversation

YoannQDQ
Copy link
Contributor

@YoannQDQ YoannQDQ commented Oct 27, 2024

Description

Add a secondary rubberband in node item creation tools to better show the polyline / polygon being traced, which match the digitizing tools behavior.

Tracing a new node item now clears the current selection.

Also fix pressing Backspace/Del keypress removes the last node. It was "eaten" by the global QShortcut that deletes the current item.

Before (Not possible to remove point, unclear what polygon will actually be drawn if one right-clicks)

add_node_item_old

After

add_node_item

@github-actions github-actions bot added this to the 3.42.0 milestone Oct 27, 2024
Copy link

github-actions bot commented Oct 27, 2024

🪟 Windows builds

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

🪟 Windows Qt6 builds

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

@YoannQDQ YoannQDQ added Feature Bug Either a bug report, or a bug fix. Let's hope for the latter! Print Layouts Related to QGIS Print Layouts, Atlas or Reporting frameworks labels Oct 27, 2024
@YoannQDQ YoannQDQ force-pushed the layout-fix-node-item-creation branch 2 times, most recently from 32e3ec8 to 21a6a50 Compare November 4, 2024 13:19
@YoannQDQ YoannQDQ requested a review from troopa81 November 5, 2024 12:57
Copy link
Contributor

@troopa81 troopa81 left a comment

Choose a reason for hiding this comment

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

If I understand correctly what you propose, you want to add a red dot line different for the temporary/last added part of the polygon while the rest is a red plain line.

I don't know much about this area of the code. Instead of adding a new createTemporaryNodeItemRubberBand and all the related code, could we not return a QGraphicsItem which aggregate two item (one plain line et one dotted?)

@YoannQDQ YoannQDQ force-pushed the layout-fix-node-item-creation branch 3 times, most recently from 9b65cf6 to 93eaf04 Compare November 7, 2024 14:51
@YoannQDQ YoannQDQ requested a review from nyalldawson November 7, 2024 14:54
@YoannQDQ YoannQDQ force-pushed the layout-fix-node-item-creation branch from 93eaf04 to c5d0ac4 Compare November 13, 2024 16:11
@YoannQDQ YoannQDQ force-pushed the layout-fix-node-item-creation branch from c5d0ac4 to 997fdd7 Compare November 22, 2024 21:37
@YoannQDQ YoannQDQ force-pushed the layout-fix-node-item-creation branch from 997fdd7 to ccb5542 Compare December 1, 2024 12:52
@YoannQDQ YoannQDQ force-pushed the layout-fix-node-item-creation branch from ccb5542 to 14ce7ea Compare December 7, 2024 14:13
@YoannQDQ YoannQDQ force-pushed the layout-fix-node-item-creation branch from cd7bf6a to f4d991f Compare December 12, 2024 13:39
@nyalldawson nyalldawson merged commit 6dc88e6 into qgis:master Dec 12, 2024
30 checks passed
@nyalldawson
Copy link
Collaborator

Thank you!

@YoannQDQ YoannQDQ deleted the layout-fix-node-item-creation branch December 12, 2024 22:09
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! Feature Print Layouts Related to QGIS Print Layouts, Atlas or Reporting frameworks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants