Add Shift+Enter to finish polygon creation by closing the shape#4497
Open
PrateekSingh070 wants to merge 2 commits into
Open
Add Shift+Enter to finish polygon creation by closing the shape#4497PrateekSingh070 wants to merge 2 commits into
PrateekSingh070 wants to merge 2 commits into
Conversation
65f4c38 to
0f6ae65
Compare
There was a problem hiding this comment.
Pull request overview
Adds a keyboard shortcut to close an in-progress polygon as a polygon (instead of finishing as a polyline), and documents the new behavior.
Changes:
- Handle
Shift+EnterinCreatePolygonObjectTool::keyPressedto finish as a polygon when there are at least 3 points. - Update user-facing docs and release notes to mention the new shortcut.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/tiled/createpolygonobjecttool.cpp |
Implements Shift+Enter handling to close the shape and finish as a polygon. |
NEWS.md |
Notes the new Shift+Enter behavior in Unreleased changes. |
docs/manual/objects.rst |
Documents Shift+Enter as an alternative to clicking the first point to close a polygon. |
docs/manual/keyboard-shortcuts.rst |
Lists Shift+Enter as “finish as polygon” while creating polygons/polylines. |
0f6ae65 to
915c8cd
Compare
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
While creating a polygon or extending a polyline, pressing Shift+Enter now closes the shape as a polygon. This requires at least three points, matching the existing behavior when clicking the first point to close. Plain Enter still finishes as a polyline.
Implements the TODO left in createpolygonobjecttool.cpp and follows up on the Backspace support added in #4372.