Merge pull request #88157 from kleonc/tilemap-move-layer-fix-moving-child-nodes
Fix `TileMap::move_layer` incorrectly moving child `TileMapLayer` nodes
This commit is contained in:
commit
a1aca7e5c9
1 changed files with 1 additions and 1 deletions
|
@ -238,7 +238,7 @@ void TileMap::move_layer(int p_layer, int p_to_pos) {
|
||||||
layers.insert(p_to_pos, layer);
|
layers.insert(p_to_pos, layer);
|
||||||
layers.remove_at(p_to_pos < p_layer ? p_layer + 1 : p_layer);
|
layers.remove_at(p_to_pos < p_layer ? p_layer + 1 : p_layer);
|
||||||
for (uint32_t i = 0; i < layers.size(); i++) {
|
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);
|
layers[i]->set_layer_index_in_tile_map_node(i);
|
||||||
}
|
}
|
||||||
notify_property_list_changed();
|
notify_property_list_changed();
|
||||||
|
|
Loading…
Reference in a new issue