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

Do not commit transforms and handles if no changes were made #87161

Merged
merged 1 commit into from
Mar 8, 2024

Conversation

ryevdokimov
Copy link
Contributor

@ryevdokimov ryevdokimov commented Jan 14, 2024

Currently left clicking without moving the mouse will commit a transform and handles unnecessarily flooding the output and history with transform messages. This PR checks that the mouse was moved, meaning a changed was made, before committing.

image

image

image

@ryevdokimov ryevdokimov requested a review from a team as a code owner January 14, 2024 03:53
@AThousandShips AThousandShips added this to the 4.3 milestone Jan 14, 2024
@ryevdokimov ryevdokimov changed the title Do not commit transforms if none were made Do not commit transforms and handles if no changes were made Jan 14, 2024
@fire
Copy link
Member

fire commented Feb 12, 2024

@KoBeWi

Thoughts on avoiding the commit of transformations when no actual change to the transform values has occurred? This could improve the editor's performance by avoiding redundant actions, but I am not familiar with this code.

@KoBeWi
Copy link
Member

KoBeWi commented Feb 12, 2024

Makes sense.
Seems like the same problem exists in 2D (e.g. in CollisionShape2D), not sure if it's as easy to fix.

@ryevdokimov ryevdokimov requested a review from a team as a code owner February 12, 2024 20:03
@KoBeWi
Copy link
Member

KoBeWi commented Feb 12, 2024

CollisionShape2D was an example, there are more 2D editors - Path2D, Polygon2D, Line2D, Raycast2D and possibly others. Hence it might not be as easy, because the code is not unified like in 3D.

@ryevdokimov
Copy link
Contributor Author

Yeah, I know it was a premature push, my bad. I'm working on fixing all of them.

@ryevdokimov
Copy link
Contributor Author

ryevdokimov commented Feb 12, 2024

CollisionShape2D was an example, there are more 2D editors - Path2D, Polygon2D, Line2D, Raycast2D and possibly others. Hence it might not be as easy, because the code is not unified like in 3D.

A lot of these end up inheriting the same class, so it wasn't too bad. I went through all the 2D nodes to see if I missed anything (clicked on any obvious handles, including with modifier keys), but I am admittedly not as familiar with 2D as I am with 3D, so let me know if I missed any.

@akien-mga akien-mga merged commit 2c0797b into godotengine:master Mar 8, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

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.

5 participants