Open andy840119 opened 1 year ago
Just need to add the ToArray()
method to the PerformOnSelection
in the HitObjectChangeHandler<T>
can fix this problem.
But need to think more about it.
if (changeHandler is TransactionalCommitComponent transactionalCommitComponent && !transactionalCommitComponent.TransactionActive)
{
// not really sure how to fix that.
beatmap.PerformOnSelection(h =>
{
if (h is T tHitObject)
action(tHitObject);
});
}
else
{
// easy to fix.
beatmap.SelectedHitObjects.ToArray().ForEach(h =>
{
if (h is T tHitObject)
action(tHitObject);
});
}
Here's the callstack: