Fix TileMap::move_layer incorrectly moving child TileMapLayer nodes

This commit is contained in:
kleonc 2024-02-09 20:59:31 +01:00
parent 4e990cd7e5
commit 858eaafc23

View File

@ -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();