-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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 tileset editor visiblity and selection context #58361
Fix tileset editor visiblity and selection context #58361
Conversation
Wait, need to change something... |
7f8f0d2
to
e2d5db1
Compare
Okay, should be sorted now. Silly oversight on my behalf |
…n tileset is available
e2d5db1
to
04535bd
Compare
Updated to be a tad less hacky |
@@ -158,6 +158,9 @@ void TilesEditorPlugin::_update_editors() { | |||
// Update the viewport. | |||
CanvasItemEditor::get_singleton()->update_viewport(); | |||
|
|||
// Make sure the tile set editor is visible if we have one assigned. | |||
tileset_editor_button->set_visible(is_visible && tile_set.is_valid()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure I understand why this is needed. Wasn't this already working?
Reading what is in make_visible() it seems like this is already done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@groud Sorry, I completely forgot about this, but I remember it now because I'm doing another pass over all the editor plugins at the moment. With regards to this visibility check, it needs both checks to be successful otherwise the tileset button will still be visible even when you aren't highlighting a tileset node.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved in PR review meeting.
Thanks! |
Makes sure the tileset editor is automatically selected when editing a tileset by clicking on it from the tilemap property in the insepctor. Also makes sure the tileset editor button's visibility is immediately toggled when a tileset is assigned or unassigned from a currently selected tilemap node.
Closes #56413