mirror of https://github.com/ppy/osu
Fix failing tests due to missing DI pieces
This commit is contained in:
parent
e67d73be7d
commit
2a8bd8d968
|
@ -26,10 +26,10 @@ public partial class ManiaDifficultySection : SetupSection
|
|||
private LabelledSliderBar<double> tickRateSlider { get; set; } = null!;
|
||||
|
||||
[Resolved]
|
||||
private Editor editor { get; set; } = null!;
|
||||
private Editor? editor { get; set; }
|
||||
|
||||
[Resolved]
|
||||
private IEditorChangeHandler changeHandler { get; set; } = null!;
|
||||
private IEditorChangeHandler? changeHandler { get; set; }
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
|
@ -116,16 +116,19 @@ private void updateKeyCount(ValueChangedEvent<float> keyCount)
|
|||
{
|
||||
if (updatingKeyCount) return;
|
||||
|
||||
updateValues();
|
||||
|
||||
if (editor == null) return;
|
||||
|
||||
updatingKeyCount = true;
|
||||
|
||||
updateValues();
|
||||
editor.Reload().ContinueWith(t =>
|
||||
{
|
||||
if (!t.GetResultSafely())
|
||||
{
|
||||
Schedule(() =>
|
||||
{
|
||||
changeHandler.RestoreState(-1);
|
||||
changeHandler!.RestoreState(-1);
|
||||
Beatmap.Difficulty.CircleSize = keyCountSlider.Current.Value = keyCount.OldValue;
|
||||
updatingKeyCount = false;
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue