diff options
author | PucklaMotzer09 <jonaas.pucher000000@gmail.com> | 2022-01-02 13:29:06 +0100 |
---|---|---|
committer | PucklaMotzer09 <jonaas.pucher000000@gmail.com> | 2022-01-02 15:22:51 +0100 |
commit | 65881a9734e5babbe261afff17895c3ea4005341 (patch) | |
tree | f00a4c8c4703e1af92f05405721fe52633c455d2 | |
parent | d58dfd4a7c02504c1fb5a436e0410420d6b30023 (diff) |
Correctly show and hide tile set editor panel
-rw-r--r-- | editor/plugins/tiles/tiles_editor_plugin.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/editor/plugins/tiles/tiles_editor_plugin.cpp b/editor/plugins/tiles/tiles_editor_plugin.cpp index 47dfc57b0f..372ddcc02d 100644 --- a/editor/plugins/tiles/tiles_editor_plugin.cpp +++ b/editor/plugins/tiles/tiles_editor_plugin.cpp @@ -157,6 +157,17 @@ void TilesEditorPlugin::_update_editors() { // Update the viewport. CanvasItemEditor::get_singleton()->update_viewport(); + + // Update visibility of bottom panel buttons. + if (tileset_editor_button->is_pressed() && !tile_set.is_valid()) { + if (tile_map) { + editor_node->make_bottom_panel_item_visible(tilemap_editor); + } else { + editor_node->hide_bottom_panel(); + } + } + tileset_editor_button->set_visible(tile_set.is_valid()); + tilemap_editor_button->set_visible(tile_map); } void TilesEditorPlugin::_notification(int p_what) { |