diff --git a/src/HexManiac.Core/Models/PokemonModel.cs b/src/HexManiac.Core/Models/PokemonModel.cs index 8644b311..af05dc4c 100644 --- a/src/HexManiac.Core/Models/PokemonModel.cs +++ b/src/HexManiac.Core/Models/PokemonModel.cs @@ -493,7 +493,7 @@ namespace HavenSoft.HexManiac.Core.Models { /// Remove the sources that match the array's original location. /// Add new sources corresponding to the array's new location. /// - private void UpdateAnchorsFromArrayMove(ModelDelta changeToken, ArrayRun original, ArrayRun moved) { + private void UpdateAnchorsFromArrayMove(ModelDelta changeToken, ITableRun original, ITableRun moved) { int originalOffset = original.Start; int segmentOffset = moved.Start; // i loops over the different segments in the array @@ -1367,6 +1367,9 @@ namespace HavenSoft.HexManiac.Core.Models { // move run var newRun = run.Duplicate(newStart, run.PointerSources.ToArray()); + if (newRun is ITableRun array) { + UpdateAnchorsFromArrayMove(changeToken, (ITableRun)run, array); + } int index = BinarySearch(run.Start); changeToken.RemoveRun(runs[index]);