-
Notifications
You must be signed in to change notification settings - Fork 275
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
Closed Polyline path #1863
Closed Polyline path #1863
Conversation
This has been discussed on Discord and I decided to add a tool option for this which inverts the behavior of the
So that users who prefer to use the |
it makes it so the Polyline path can be automatically closed, and the Ctrl key now temporarily inverts the behavior while held.
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.
Functionality wise I have no issues with this PR. There are however some minor things I'd like addressed before we merge this.
- `_closed` -> `closed` - `setClosed()` -> `setClosedPath()` - `mClosedOverride` -> `mClosedPathOverrideEnabled` - `Closed` -> `Closed Path`
The requested changes have been committed! |
Otherwise the checkbox won't look correct.
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.
I took the PR for another spin and noticed a few other things I forgot to check the last time, sorry about that.
Things that wasn't working that I've fixed for you:
- The check state would not be saved to our settings file, meaning
settings.value("closedPolylinePath").toBool()
would always return false. - The checkbox in tooloptionswidget would not be updated on startup.
I also took the liberty to rename useClosedBox to useClosedPathBox.
With those things taken care of, this PR should imo. be good to go.
Feel free to merge the PR if you're satisfied with those changes.
I did notice the state wasn't being saved, but then I tested the Bézier option and it didn't save either hahah Thanks for the fixes though! |
Yeah it's not consistent... ideally all tool option properties should be saved to settings. btw. are you allowed to merge the PR yourself? |
This PR adds the
Closed
option to the Polyline tool which automatically closes it's path as it's being drawn.The
Ctrl
key can be held to temporarily override the closed state:Closed
option is on, holdingCtrl
temporarily disables itClosed
option is off, holdingCtrl
temporarily enables itVideo
2024-07-22.21-42-20_edit.mp4
It works with both double-clicking and pressing Enter to apply the Polyline.