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

Only apply disable rules when in a screen stack.

This commit is contained in:
Dean Herbert 2017-07-12 13:40:17 +09:00
parent 54f6befd67
commit 04e99d1369

View File

@ -89,8 +89,13 @@ namespace osu.Game.Screens
{
if (!IsCurrentScreen) return;
ruleset.Disabled = !AllowBeatmapRulesetChange;
beatmap.Disabled = !AllowBeatmapRulesetChange;
if (ParentScreen != null)
{
// we only want to apply these restrictions when we are inside a screen stack.
// the use case for not applying is in visual/unit tests.
ruleset.Disabled = !AllowBeatmapRulesetChange;
beatmap.Disabled = !AllowBeatmapRulesetChange;
}
}
protected override void OnResuming(Screen last)