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

Fix Polygon2D undo on transforming vertices #83659

Merged
merged 1 commit into from
Oct 20, 2023

Conversation

aXu-AP
Copy link
Contributor

@aXu-AP aXu-AP commented Oct 20, 2023

Fix #83657
Instead of checking the mode we are in, check for exceptions that are handled elsewhere. Add checks if we are transforming polygon with move, rotate or scale tool.

Also removes extraneous comments in this block, as undo-redo action name is self-explanatory.

@aXu-AP aXu-AP requested a review from a team as a code owner October 20, 2023 07:40
@akien-mga akien-mga added this to the 4.2 milestone Oct 20, 2023
@aXu-AP aXu-AP force-pushed the uv-edit-transform-points-undo branch from 0543979 to 32781dd Compare October 20, 2023 08:50
@aXu-AP
Copy link
Contributor Author

aXu-AP commented Oct 20, 2023

Updated.
After thinking a bit, my initial idea for just excluding actions isn't future-proof. If some other actions were added (for example, #83612 ), extra checks would've needed to be added.
On the other hand, if somebody adds action which transforms polygon, it would be expected to add undo functionality then (ie. adding cases to the switch statement).

Fix: Action not committed to history when transforming all points in UV editor's Points mode.
@aXu-AP aXu-AP force-pushed the uv-edit-transform-points-undo branch from 32781dd to 76f81cf Compare October 20, 2023 08:59
@akien-mga akien-mga merged commit 365507f into godotengine:master Oct 20, 2023
15 checks passed
@akien-mga
Copy link
Member

Thanks!

@aXu-AP aXu-AP deleted the uv-edit-transform-points-undo branch October 20, 2023 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Action not committed to history when transforming all points in UV editor's Points mode
3 participants