mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 09:17:51 +08:00
Merge pull request #12220 from peppy/editor-fix-speed-multiplier-precision
Fix legacy control point precision having an adverse effect on the editor
This commit is contained in:
commit
f6f1ef6986
@ -28,7 +28,16 @@ namespace osu.Game.Screens.Edit.Timing
|
||||
{
|
||||
if (point.NewValue != null)
|
||||
{
|
||||
multiplierSlider.Current = point.NewValue.SpeedMultiplierBindable;
|
||||
var selectedPointBindable = point.NewValue.SpeedMultiplierBindable;
|
||||
|
||||
// there may be legacy control points, which contain infinite precision for compatibility reasons (see LegacyDifficultyControlPoint).
|
||||
// generally that level of precision could only be set by externally editing the .osu file, so at the point
|
||||
// a user is looking to update this within the editor it should be safe to obliterate this additional precision.
|
||||
double expectedPrecision = new DifficultyControlPoint().SpeedMultiplierBindable.Precision;
|
||||
if (selectedPointBindable.Precision < expectedPrecision)
|
||||
selectedPointBindable.Precision = expectedPrecision;
|
||||
|
||||
multiplierSlider.Current = selectedPointBindable;
|
||||
multiplierSlider.Current.BindValueChanged(_ => ChangeHandler?.SaveState());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user