Skip to content

Commit

Permalink
Merge pull request #66560 from MisterMX/fix/tileset-move-custom-data-…
Browse files Browse the repository at this point in the history
…layer

fix(tileset): Move custom data layer
  • Loading branch information
akien-mga committed Oct 5, 2022
2 parents d935235 + cfe518b commit 57ffc4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scene/resources/tile_set.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5017,7 +5017,7 @@ void TileData::add_custom_data_layer(int p_to_pos) {
void TileData::move_custom_data_layer(int p_from_index, int p_to_pos) {
ERR_FAIL_INDEX(p_from_index, custom_data.size());
ERR_FAIL_INDEX(p_to_pos, custom_data.size() + 1);
custom_data.insert(p_to_pos, navigation[p_from_index]);
custom_data.insert(p_to_pos, custom_data[p_from_index]);
custom_data.remove_at(p_to_pos < p_from_index ? p_from_index + 1 : p_from_index);
}

Expand Down

0 comments on commit 57ffc4d

Please sign in to comment.