From d3f418e7a0c5318035f6293ab57521f124de52d8 Mon Sep 17 00:00:00 2001 From: Kent Thang Date: Sun, 6 Oct 2024 12:52:50 +0200 Subject: [PATCH] Fix editor glitch when changing tabs with invisible TileMapLayer --- editor/plugins/tiles/tile_map_layer_editor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/plugins/tiles/tile_map_layer_editor.cpp b/editor/plugins/tiles/tile_map_layer_editor.cpp index dcfd92f6f9e..8ac74f1e471 100644 --- a/editor/plugins/tiles/tile_map_layer_editor.cpp +++ b/editor/plugins/tiles/tile_map_layer_editor.cpp @@ -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(); } }