mirror of
https://github.com/ppy/osu.git
synced 2025-01-26 16:12:54 +08:00
Merge pull request #23178 from Joehuu/fix-count-not-updating-when-deleting
Fix song select beatmap difficulty count not updating when deleting
This commit is contained in:
commit
e58e1151f3
@ -1068,6 +1068,21 @@ namespace osu.Game.Tests.Visual.SongSelect
|
|||||||
AddAssert("options disabled", () => !songSelect.ChildrenOfType<FooterButtonOptions>().Single().Enabled.Value);
|
AddAssert("options disabled", () => !songSelect.ChildrenOfType<FooterButtonOptions>().Single().Enabled.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestTextBoxBeatmapDifficultyCount()
|
||||||
|
{
|
||||||
|
createSongSelect();
|
||||||
|
|
||||||
|
AddAssert("0 matching shown", () => songSelect.ChildrenOfType<FilterControl>().Single().InformationalText == "0 matching beatmaps");
|
||||||
|
|
||||||
|
addRulesetImportStep(0);
|
||||||
|
|
||||||
|
AddAssert("3 matching shown", () => songSelect.ChildrenOfType<FilterControl>().Single().InformationalText == "3 matching beatmaps");
|
||||||
|
AddStep("delete all beatmaps", () => manager.Delete());
|
||||||
|
AddUntilStep("wait for no beatmap", () => Beatmap.IsDefault);
|
||||||
|
AddAssert("0 matching shown", () => songSelect.ChildrenOfType<FilterControl>().Single().InformationalText == "0 matching beatmaps");
|
||||||
|
}
|
||||||
|
|
||||||
private void waitForInitialSelection()
|
private void waitForInitialSelection()
|
||||||
{
|
{
|
||||||
AddUntilStep("wait for initial selection", () => !Beatmap.IsDefault);
|
AddUntilStep("wait for initial selection", () => !Beatmap.IsDefault);
|
||||||
|
@ -45,7 +45,7 @@ namespace osu.Game.Screens.Select
|
|||||||
public float BleedBottom { get; set; }
|
public float BleedBottom { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Triggered when the <see cref="BeatmapSets"/> loaded change and are completely loaded.
|
/// Triggered when <see cref="BeatmapSets"/> finish loading, or are subsequently changed.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Action? BeatmapSetsChanged;
|
public Action? BeatmapSetsChanged;
|
||||||
|
|
||||||
@ -353,6 +353,8 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
if (!Scroll.UserScrolling)
|
if (!Scroll.UserScrolling)
|
||||||
ScrollToSelected(true);
|
ScrollToSelected(true);
|
||||||
|
|
||||||
|
BeatmapSetsChanged?.Invoke();
|
||||||
});
|
});
|
||||||
|
|
||||||
public void UpdateBeatmapSet(BeatmapSetInfo beatmapSet) => Schedule(() =>
|
public void UpdateBeatmapSet(BeatmapSetInfo beatmapSet) => Schedule(() =>
|
||||||
|
Loading…
Reference in New Issue
Block a user