mirror of
https://github.com/ppy/osu
synced 2024-12-26 17:02:59 +00:00
Remove redundant diff processing
This commit is contained in:
parent
9763a58392
commit
93ce6fc981
@ -41,17 +41,12 @@ namespace osu.Game.Screens.Edit
|
|||||||
|
|
||||||
editorBeatmap.BeginChange();
|
editorBeatmap.BeginChange();
|
||||||
processHitObjects(result, () => newBeatmap ??= readBeatmap(newState));
|
processHitObjects(result, () => newBeatmap ??= readBeatmap(newState));
|
||||||
processTimingPoints(result, () => newBeatmap ??= readBeatmap(newState));
|
processTimingPoints(() => newBeatmap ??= readBeatmap(newState));
|
||||||
editorBeatmap.EndChange();
|
editorBeatmap.EndChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void processTimingPoints(DiffResult result, Func<IBeatmap> getNewBeatmap)
|
private void processTimingPoints(Func<IBeatmap> getNewBeatmap)
|
||||||
{
|
{
|
||||||
findChangedIndices(result, LegacyDecoder<Beatmap>.Section.TimingPoints, out var removedIndices, out var addedIndices);
|
|
||||||
|
|
||||||
if (removedIndices.Count == 0 && addedIndices.Count == 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
ControlPointInfo newControlPoints = EditorBeatmap.ConvertControlPoints(getNewBeatmap().ControlPointInfo);
|
ControlPointInfo newControlPoints = EditorBeatmap.ConvertControlPoints(getNewBeatmap().ControlPointInfo);
|
||||||
|
|
||||||
// Remove all groups from the current beatmap which don't have a corresponding equal group in the new beatmap.
|
// Remove all groups from the current beatmap which don't have a corresponding equal group in the new beatmap.
|
||||||
|
Loading…
Reference in New Issue
Block a user