mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 22:19:30 +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:
commit
f30d68cd4e
@ -43,6 +43,7 @@ namespace osu.Game.Rulesets.Mania.Edit.Setup
|
|||||||
private void updateBeatmap()
|
private void updateBeatmap()
|
||||||
{
|
{
|
||||||
Beatmap.BeatmapInfo.SpecialStyle = specialStyle.Current.Value;
|
Beatmap.BeatmapInfo.SpecialStyle = specialStyle.Current.Value;
|
||||||
|
Beatmap.SaveState();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -49,6 +49,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Setup
|
|||||||
private void updateBeatmap()
|
private void updateBeatmap()
|
||||||
{
|
{
|
||||||
Beatmap.BeatmapInfo.StackLeniency = stackLeniency.Current.Value;
|
Beatmap.BeatmapInfo.StackLeniency = stackLeniency.Current.Value;
|
||||||
|
Beatmap.SaveState();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -78,7 +78,10 @@ namespace osu.Game.Screens.Edit
|
|||||||
this.beatmapInfo = beatmapInfo ?? playableBeatmap.BeatmapInfo;
|
this.beatmapInfo = beatmapInfo ?? playableBeatmap.BeatmapInfo;
|
||||||
|
|
||||||
if (beatmapSkin is Skin skin)
|
if (beatmapSkin is Skin skin)
|
||||||
|
{
|
||||||
BeatmapSkin = new EditorBeatmapSkin(skin);
|
BeatmapSkin = new EditorBeatmapSkin(skin);
|
||||||
|
BeatmapSkin.BeatmapSkinChanged += SaveState;
|
||||||
|
}
|
||||||
|
|
||||||
beatmapProcessor = playableBeatmap.BeatmapInfo.Ruleset.CreateInstance().CreateBeatmapProcessor(PlayableBeatmap);
|
beatmapProcessor = playableBeatmap.BeatmapInfo.Ruleset.CreateInstance().CreateBeatmapProcessor(PlayableBeatmap);
|
||||||
|
|
||||||
|
@ -126,6 +126,8 @@ namespace osu.Game.Screens.Edit.Setup
|
|||||||
Beatmap.BeatmapInfo.EpilepsyWarning = epilepsyWarning.Current.Value;
|
Beatmap.BeatmapInfo.EpilepsyWarning = epilepsyWarning.Current.Value;
|
||||||
Beatmap.BeatmapInfo.LetterboxInBreaks = letterboxDuringBreaks.Current.Value;
|
Beatmap.BeatmapInfo.LetterboxInBreaks = letterboxDuringBreaks.Current.Value;
|
||||||
Beatmap.BeatmapInfo.SamplesMatchPlaybackRate = samplesMatchPlaybackRate.Current.Value;
|
Beatmap.BeatmapInfo.SamplesMatchPlaybackRate = samplesMatchPlaybackRate.Current.Value;
|
||||||
|
|
||||||
|
Beatmap.SaveState();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -96,6 +96,7 @@ namespace osu.Game.Screens.Edit.Setup
|
|||||||
Beatmap.Difficulty.OverallDifficulty = overallDifficultySlider.Current.Value;
|
Beatmap.Difficulty.OverallDifficulty = overallDifficultySlider.Current.Value;
|
||||||
|
|
||||||
Beatmap.UpdateAllHitObjects();
|
Beatmap.UpdateAllHitObjects();
|
||||||
|
Beatmap.SaveState();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -87,7 +87,7 @@ namespace osu.Game.Screens.Edit.Setup
|
|||||||
target.Current.Value = value;
|
target.Current.Value = value;
|
||||||
|
|
||||||
updateReadOnlyState();
|
updateReadOnlyState();
|
||||||
updateMetadata();
|
Scheduler.AddOnce(updateMetadata);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateReadOnlyState()
|
private void updateReadOnlyState()
|
||||||
@ -102,7 +102,7 @@ namespace osu.Game.Screens.Edit.Setup
|
|||||||
|
|
||||||
// for now, update on commit rather than making BeatmapMetadata bindables.
|
// 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.
|
// after switching database engines we can reconsider if switching to bindables is a good direction.
|
||||||
updateMetadata();
|
Scheduler.AddOnce(updateMetadata);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateMetadata()
|
private void updateMetadata()
|
||||||
@ -117,6 +117,8 @@ namespace osu.Game.Screens.Edit.Setup
|
|||||||
Beatmap.BeatmapInfo.DifficultyName = difficultyTextBox.Current.Value;
|
Beatmap.BeatmapInfo.DifficultyName = difficultyTextBox.Current.Value;
|
||||||
Beatmap.Metadata.Source = sourceTextBox.Current.Value;
|
Beatmap.Metadata.Source = sourceTextBox.Current.Value;
|
||||||
Beatmap.Metadata.Tags = tagsTextBox.Current.Value;
|
Beatmap.Metadata.Tags = tagsTextBox.Current.Value;
|
||||||
|
|
||||||
|
Beatmap.SaveState();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user