-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Fix undo/redo behavior of ColorPicker and add ability to cancel/confirm color selection #88690
Conversation
In the long run, it might make sense to add an ability for For now, the Also might make sense to eventually add an internal |
c458a2f
to
d324ec2
Compare
Perhaps you could solve this problem #88412 |
Noticed that this introduces a bug in a Visual Shader node similar to a previous attempted fix. #44895 |
d324ec2
to
a42ce3a
Compare
@aXu-AP @KoBeWi I believe I've found a solution to the big web of issues/PRs surrounding color property changes. To summarize the situation before:
My solution was to give I've considered other alternatives like editor property hints, or using
I would recommend we phase out the co-opting of |
It causes live edit to not preview color changes in real time. Continuous undo operations are not really a problem; that's what undoredo merging is for. |
This PR does not break live previews. Is that what you are seeing? Also, undo redo merging is not relevant here because the color picker is not only capable of generating multiple successive undo operations that don't merge, they also cannot be undone until you close the dialog, after which you have to undo all your edits you did in the dialog. |
By live edit I mean syncing scene changes with the running project: godot_siuTMPo2zh.mp4With your PR the changes are synced only once the dialog is closed: godot.windows.editor.dev.x86_64_NhrLV6wkPF.mp4Though not sure how important is that. Otherwise the new behavior is an improvement. |
a42ce3a
to
a6f17a2
Compare
…/confirm color selection.
a6f17a2
to
d827b34
Compare
@AThousandShips The Linux editor build failed with the following message: |
Probably not, will re run and see if it's just a random thing, otherwise it's somehow related to this PR |
Thanks! |
Great job. I tried to tackle this a bit ago but couldn't figure out how to fix this while keeping the live preview working. Great to see this resolved. |
Relevant Issues
Changes
This PR fixes a couple of bugs while at the same time introducing some UX changes:
ui_cancel
action (ESCAPE
by default) is used to cancel out. Dismissing the popup through other means (like clicking outside of it) still confirms the color change as before.ui_accept
action (ENTER
by default) to dismiss the popup and confirm the color operation.UX Impact
ui_cancel
to confirm a color operation would have to get used to now pressingui_accept
instead, but the old scheme was an oddity and the new scheme is universally known and consistent with the behaviour of all other dialogs.