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

Make TileMap overridable "set_cell" function called on undo/redo #27845

Merged
merged 1 commit into from
Apr 30, 2019

Conversation

samdze
Copy link
Contributor

@samdze samdze commented Apr 9, 2019

This is a follow-up to #27500.
The set_cell override was working fine in the editor and undo/redo operations were working as always.
The only thing was that the overridden set_cell was not called on undo/redo, the default native set_cell was called in this case.

This PR fixes that issue, making the editor always call the TileMap set_celld method (which is used only in the TileMap editor and is not exposed to scripting languages), even on undo/redo, which then makes the call to set_cell.

set_celld becomes an utility method to make the call to the overridable set_cell method easier.

Copy link
Contributor

@MarianoGnu MarianoGnu left a comment

Choose a reason for hiding this comment

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

renaming that function would be good, not mandatory tho. Changes looks good

editor/plugins/tile_map_editor_plugin.cpp Outdated Show resolved Hide resolved
@akien-mga akien-mga merged commit ac0369e into godotengine:master Apr 30, 2019
@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.

3 participants