mirror of
https://github.com/ppy/osu.git
synced 2025-03-14 05:07:26 +08:00
Revert ruleset when not applied filters (includes scope change)
This commit is contained in:
parent
cb7c2f713b
commit
9fa39cd34e
@ -18,6 +18,8 @@ namespace osu.Game.Overlays
|
||||
protected Bindable<RulesetInfo> Ruleset => Header.Ruleset;
|
||||
protected Bindable<Country> Country => Header.Country;
|
||||
|
||||
private bool requiresRulesetRevert;
|
||||
|
||||
private APIRequest lastRequest;
|
||||
|
||||
[Resolved]
|
||||
@ -50,6 +52,25 @@ namespace osu.Game.Overlays
|
||||
});
|
||||
}
|
||||
|
||||
protected override void PopIn()
|
||||
{
|
||||
base.PopIn();
|
||||
|
||||
if (requiresRulesetRevert)
|
||||
{
|
||||
Ruleset.SetDefault();
|
||||
requiresRulesetRevert = false;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void PopOutComplete()
|
||||
{
|
||||
base.PopOutComplete();
|
||||
|
||||
if (Header.Current.Value == default && Country.Value == null)
|
||||
requiresRulesetRevert = true;
|
||||
}
|
||||
|
||||
protected override void OnTabChanged(RankingsScope tab)
|
||||
{
|
||||
// country filtering is only valid for performance scope.
|
||||
|
Loading…
x
Reference in New Issue
Block a user