From 96b6199de91302f5e71ae565ddd329a116aa6bfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gilles=20Roudi=C3=A8re?= Date: Tue, 16 Apr 2024 16:02:55 +0200 Subject: [PATCH] Fix TileMap enabling Y-sort on child nodes --- scene/2d/tile_map.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp index bbf1d09bbc8..84d3a5f7faf 100644 --- a/scene/2d/tile_map.cpp +++ b/scene/2d/tile_map.cpp @@ -429,6 +429,7 @@ Color TileMap::get_layer_modulate(int p_layer) const { void TileMap::set_layer_y_sort_enabled(int p_layer, bool p_y_sort_enabled) { TILEMAP_CALL_FOR_LAYER(p_layer, set_y_sort_enabled, p_y_sort_enabled); + update_configuration_warnings(); } bool TileMap::is_layer_y_sort_enabled(int p_layer) const { @@ -437,6 +438,7 @@ bool TileMap::is_layer_y_sort_enabled(int p_layer) const { void TileMap::set_layer_y_sort_origin(int p_layer, int p_y_sort_origin) { TILEMAP_CALL_FOR_LAYER(p_layer, set_y_sort_origin, p_y_sort_origin); + update_configuration_warnings(); } int TileMap::get_layer_y_sort_origin(int p_layer) const { @@ -518,9 +520,6 @@ void TileMap::set_y_sort_enabled(bool p_enable) { return; } Node2D::set_y_sort_enabled(p_enable); - for (TileMapLayer *layer : layers) { - layer->set_y_sort_enabled(p_enable); - } _emit_changed(); update_configuration_warnings(); }