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

Remember previously selected TileMap tile. #74039

Conversation

daBlesr
Copy link
Contributor

@daBlesr daBlesr commented Feb 27, 2023

When the Tile Editor Plugin was triggered for an update, it sends an edit call for an old selected tile_set to TileSetEditor.
This class in turn, then syncs this change back to the tile editor plugin, ignoring the latest selected tile.
The changes I have done make sure the correct tile set is used.

@groud
Copy link
Member

groud commented Feb 27, 2023

Are you sure this is not breaking the editing of a standalone TileSet ? LIke, when you create a TileSet resource, and edit it without attaching it to a TileMap.

@daBlesr
Copy link
Contributor Author

daBlesr commented Feb 27, 2023

@groud thanks for pointing it out, I wasn't aware of this functionality. Afaik, I can only create new TileMap nodes in the scene tree and no TileSet nodes. And when I add a new resource to TileSet view, it is also automatically listed in the TileMap view. If you have another way of creating a standalone TileSet, let me know and I'll try to see if it causes problems.

@groud
Copy link
Member

groud commented Feb 27, 2023

If you have another way of creating a standalone TileSet, let me know and I'll try to see if it causes problems.

You can either do it from the file system dock, or at the top of the inspector:

Peek.27-02-2023.14-46.mp4

@daBlesr
Copy link
Contributor Author

daBlesr commented Feb 28, 2023

Thanks, based on your video I was able to indeed correct the PR for supporting standalone TileSets. I have added some code to make sure the correct panels are shown in the editor.

… old selected TileSet after an edit call with a null pointer.
@daBlesr daBlesr force-pushed the tilemap-remember-previosuly-selected-tile branch from b9e813b to 66374c8 Compare February 28, 2023 21:31
Copy link
Member

@KoBeWi KoBeWi left a comment

Choose a reason for hiding this comment

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

This seems to also fix #73533

@akien-mga akien-mga merged commit 7e11cc8 into godotengine:master Mar 2, 2023
@akien-mga
Copy link
Member

Thanks! And congrats for your first merged Godot contribution 🎉

@YuriSizov
Copy link
Contributor

Cherry-picked for 4.0.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
5 participants