mirror of
https://github.com/ppy/osu
synced 2024-12-12 18:07:52 +00:00
Fix legacy control point precision having an adverse effect on the editor
This commit is contained in:
parent
d51f4e108e
commit
90c75a64cf
@ -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