mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 21:02:54 +08:00
Fix data flow being sometimes incorrect
This commit is contained in:
parent
552230af9d
commit
53c30dca64
@ -51,6 +51,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
AddStep("clear contents", Clear);
|
||||
AddStep("reset ruleset", () => Ruleset.Value = rulesetStore.GetRuleset(0));
|
||||
AddStep("reset mods", () => SelectedMods.SetDefault());
|
||||
AddStep("set beatmap", () => Beatmap.Value = CreateWorkingBeatmap(new OsuRuleset().RulesetInfo));
|
||||
AddStep("set up presets", () =>
|
||||
{
|
||||
Realm.Write(r =>
|
||||
@ -92,6 +93,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
State = { Value = Visibility.Visible },
|
||||
Beatmap = Beatmap.Value,
|
||||
SelectedMods = { BindTarget = SelectedMods }
|
||||
});
|
||||
waitForColumnLoad();
|
||||
|
@ -133,9 +133,9 @@ namespace osu.Game.Overlays.Mods
|
||||
|
||||
private Sample? columnAppearSample;
|
||||
|
||||
private WorkingBeatmap beatmap = null!;
|
||||
private WorkingBeatmap? beatmap;
|
||||
|
||||
public WorkingBeatmap Beatmap
|
||||
public WorkingBeatmap? Beatmap
|
||||
{
|
||||
get => beatmap;
|
||||
set
|
||||
@ -143,7 +143,8 @@ namespace osu.Game.Overlays.Mods
|
||||
if (beatmap == value) return;
|
||||
|
||||
beatmap = value;
|
||||
modEffectPreviewPanel.BeatmapInfo.Value = beatmap.BeatmapInfo;
|
||||
if (IsLoaded)
|
||||
modEffectPreviewPanel.BeatmapInfo.Value = beatmap?.BeatmapInfo;
|
||||
}
|
||||
}
|
||||
|
||||
@ -246,7 +247,8 @@ namespace osu.Game.Overlays.Mods
|
||||
{
|
||||
Vertical = PADDING,
|
||||
Horizontal = 70
|
||||
}
|
||||
},
|
||||
BeatmapInfo = { Value = beatmap?.BeatmapInfo }
|
||||
},
|
||||
footerButtonFlow = new FillFlowContainer<ShearedButton>
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user