Skip to content

Commit

Permalink
Merge pull request #88157 from kleonc/tilemap-move-layer-fix-moving-c…
Browse files Browse the repository at this point in the history
…hild-nodes

Fix `TileMap::move_layer` incorrectly moving child `TileMapLayer` nodes
  • Loading branch information
akien-mga committed Feb 12, 2024
2 parents d2f69ce + 858eaaf commit a1aca7e
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 @@ -238,7 +238,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);
}
notify_property_list_changed();
Expand Down

0 comments on commit a1aca7e

Please sign in to comment.