mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 14:46:38 +09:00
Merge pull request #15304 from peppy/fix-editor-new-beatmap-sample-change-crash
Fix editor crash when attempting to change sample/velocity from timeline on new beatmap
This commit is contained in:
@ -56,6 +56,11 @@ namespace osu.Game.Tests.Visual.Editing
|
||||
|
||||
checkMutations();
|
||||
|
||||
// After placement these must be non-default as defaults are read-only.
|
||||
AddAssert("Placed object has non-default control points", () =>
|
||||
editorBeatmap.HitObjects[0].SampleControlPoint != SampleControlPoint.DEFAULT &&
|
||||
editorBeatmap.HitObjects[0].DifficultyControlPoint != DifficultyControlPoint.DEFAULT);
|
||||
|
||||
AddStep("Save", () => InputManager.Keys(PlatformAction.Save));
|
||||
|
||||
checkMutations();
|
||||
|
@ -119,6 +119,8 @@ namespace osu.Game.Rulesets.Objects
|
||||
DifficultyControlPoint = (DifficultyControlPoint)legacyInfo.DifficultyPointAt(StartTime).DeepClone();
|
||||
DifficultyControlPoint.Time = StartTime;
|
||||
}
|
||||
else if (DifficultyControlPoint == DifficultyControlPoint.DEFAULT)
|
||||
DifficultyControlPoint = new DifficultyControlPoint();
|
||||
|
||||
ApplyDefaultsToSelf(controlPointInfo, difficulty);
|
||||
|
||||
@ -128,6 +130,8 @@ namespace osu.Game.Rulesets.Objects
|
||||
SampleControlPoint = (SampleControlPoint)legacyInfo.SamplePointAt(this.GetEndTime() + control_point_leniency).DeepClone();
|
||||
SampleControlPoint.Time = this.GetEndTime() + control_point_leniency;
|
||||
}
|
||||
else if (SampleControlPoint == SampleControlPoint.DEFAULT)
|
||||
SampleControlPoint = new SampleControlPoint();
|
||||
|
||||
nestedHitObjects.Clear();
|
||||
|
||||
|
Reference in New Issue
Block a user