Skip to content

Commit

Permalink
Fix TileMap::move_layer incorrectly moving child TileMapLayer nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
kleonc committed Feb 9, 2024
1 parent 4e990cd commit 858eaaf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scene/2d/tile_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 858eaaf

Please sign in to comment.