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

Change UndoRedo to use Callables #66070

Merged
merged 1 commit into from
Sep 19, 2022
Merged

Conversation

KoBeWi
Copy link
Member

@KoBeWi KoBeWi commented Sep 18, 2022

This PR makes UndoRedo use Callables. Everything now uses EditorUndoRedoManager, so this is a pretty low-impact change. But it paves the road for changing EditorUndoRedoManager too in the future.

Note that, while you can use GDScript lambdas in UndoRedo and it works, right now it will print an error, because the method name can't be obtained. We need some sort of "get method safe" in CallableCustom to prevent this. For now it's not important though.

Bugsquad edit:

@fire-forge
Copy link
Contributor

This also closes godotengine/godot-proposals#5038

Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@akien-mga akien-mga merged commit 97a6c9f into godotengine:master Sep 19, 2022
@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.

Make UndoRedo.add_do/undo_method() use Callable
3 participants