1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 21:13:01 +08:00

Merge pull request #19547 from peppy/editor-setup-no-state-change

Fix multiple cases of mutations at editor setup screen not triggering a state save
This commit is contained in:
Bartłomiej Dach 2022-08-16 22:19:12 +02:00 committed by GitHub
commit f30d68cd4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 12 additions and 2 deletions

View File

@ -43,6 +43,7 @@ namespace osu.Game.Rulesets.Mania.Edit.Setup
private void updateBeatmap()
{
Beatmap.BeatmapInfo.SpecialStyle = specialStyle.Current.Value;
Beatmap.SaveState();
}
}
}

View File

@ -49,6 +49,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Setup
private void updateBeatmap()
{
Beatmap.BeatmapInfo.StackLeniency = stackLeniency.Current.Value;
Beatmap.SaveState();
}
}
}

View File

@ -78,7 +78,10 @@ namespace osu.Game.Screens.Edit
this.beatmapInfo = beatmapInfo ?? playableBeatmap.BeatmapInfo;
if (beatmapSkin is Skin skin)
{
BeatmapSkin = new EditorBeatmapSkin(skin);
BeatmapSkin.BeatmapSkinChanged += SaveState;
}
beatmapProcessor = playableBeatmap.BeatmapInfo.Ruleset.CreateInstance().CreateBeatmapProcessor(PlayableBeatmap);

View File

@ -126,6 +126,8 @@ namespace osu.Game.Screens.Edit.Setup
Beatmap.BeatmapInfo.EpilepsyWarning = epilepsyWarning.Current.Value;
Beatmap.BeatmapInfo.LetterboxInBreaks = letterboxDuringBreaks.Current.Value;
Beatmap.BeatmapInfo.SamplesMatchPlaybackRate = samplesMatchPlaybackRate.Current.Value;
Beatmap.SaveState();
}
}
}

View File

@ -96,6 +96,7 @@ namespace osu.Game.Screens.Edit.Setup
Beatmap.Difficulty.OverallDifficulty = overallDifficultySlider.Current.Value;
Beatmap.UpdateAllHitObjects();
Beatmap.SaveState();
}
}
}

View File

@ -87,7 +87,7 @@ namespace osu.Game.Screens.Edit.Setup
target.Current.Value = value;
updateReadOnlyState();
updateMetadata();
Scheduler.AddOnce(updateMetadata);
}
private void updateReadOnlyState()
@ -102,7 +102,7 @@ namespace osu.Game.Screens.Edit.Setup
// for now, update on commit rather than making BeatmapMetadata bindables.
// after switching database engines we can reconsider if switching to bindables is a good direction.
updateMetadata();
Scheduler.AddOnce(updateMetadata);
}
private void updateMetadata()
@ -117,6 +117,8 @@ namespace osu.Game.Screens.Edit.Setup
Beatmap.BeatmapInfo.DifficultyName = difficultyTextBox.Current.Value;
Beatmap.Metadata.Source = sourceTextBox.Current.Value;
Beatmap.Metadata.Tags = tagsTextBox.Current.Value;
Beatmap.SaveState();
}
}
}