summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMisterMX <mbxd12@web.de>2022-09-28 19:49:07 +0200
committerMisterMX <mbxd12@web.de>2022-09-29 11:53:48 +0200
commitcfe518b90bd8630a84d25be42820ee081039d980 (patch)
treea017218ac7bc0ad0d88cbd743b0b5e2c3f868466
parentf8745f2f71c79972df66f17a3da75f6e328bc55d (diff)
fix(tileset): Move custom data layer
Fix crash when moving a custom data layer. Signed-off-by: MisterMX <mbxd12@web.de>
-rw-r--r--scene/resources/tile_set.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/resources/tile_set.cpp b/scene/resources/tile_set.cpp
index ae83e2136f..e42bcff810 100644
--- a/scene/resources/tile_set.cpp
+++ b/scene/resources/tile_set.cpp
@@ -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);
}