Fix editor glitch when changing tabs with invisible TileMapLayer

This commit is contained in:
Kent Thang 2024-10-06 12:52:50 +02:00
parent db66bd35af
commit d3f418e7a0

View file

@ -4094,7 +4094,7 @@ void TileMapLayerEditor::_tab_changed(int p_tab_id) {
TileMapLayer *tile_map_layer = _get_edited_layer();
if (tile_map_layer) {
if (tile_map_layer->get_tile_set().is_valid()) {
if (tile_map_layer->get_tile_set().is_valid() && tile_map_layer->is_enabled() && tile_map_layer->is_visible_in_tree()) {
tabs_data[tabs_bar->get_current_tab()].panel->show();
}
}