From 858eaafc23baab7d6d76d5f1cc93d7dd7739cd44 Mon Sep 17 00:00:00 2001 From: kleonc <9283098+kleonc@users.noreply.github.com> Date: Fri, 9 Feb 2024 20:59:31 +0100 Subject: [PATCH] Fix TileMap::move_layer incorrectly moving child TileMapLayer nodes --- scene/2d/tile_map.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp index f40ee1f506b..c3fe1537f62 100644 --- a/scene/2d/tile_map.cpp +++ b/scene/2d/tile_map.cpp @@ -409,7 +409,7 @@ void TileMap::move_layer(int p_layer, int p_to_pos) { layers.insert(p_to_pos, layer); layers.remove_at(p_to_pos < p_layer ? p_layer + 1 : p_layer); for (uint32_t i = 0; i < layers.size(); i++) { - move_child(layer, i); + move_child(layers[i], i); layers[i]->set_layer_index_in_tile_map_node(i); } queue_internal_update();