Fix undo/redo behaving poorly with simultaneous objects

This commit is contained in:
smoogipoo
2020-04-30 20:39:41 +09:00
parent 1cb3f39f60
commit c96bc5c51c
3 changed files with 45 additions and 6 deletions

View File

@ -304,6 +304,31 @@ namespace osu.Game.Tests.Editing
runTest(patch);
}
[Test]
public void TestChangeHitObjectAtSameTime()
{
current.AddRange(new[]
{
new HitCircle { StartTime = 500, Position = new Vector2(50) },
new HitCircle { StartTime = 500, Position = new Vector2(100) },
new HitCircle { StartTime = 500, Position = new Vector2(150) },
new HitCircle { StartTime = 500, Position = new Vector2(200) },
});
var patch = new OsuBeatmap
{
HitObjects =
{
new HitCircle { StartTime = 500, Position = new Vector2(150) },
new HitCircle { StartTime = 500, Position = new Vector2(100) },
new HitCircle { StartTime = 500, Position = new Vector2(50) },
new HitCircle { StartTime = 500, Position = new Vector2(200) },
}
};
runTest(patch);
}
private void runTest(IBeatmap patch)
{
// Due to the method of testing, "patch" comes in without having been decoded via a beatmap decoder.