From 35db20a3378fd35df275faa7b6742beebea3c131 Mon Sep 17 00:00:00 2001 From: Andrei Zavatski Date: Mon, 24 Jun 2019 02:01:00 +0300 Subject: [PATCH] Remove useless bindable check --- osu.Game/Overlays/Toolbar/ToolbarRulesetSelector.cs | 7 +------ osu.Game/Rulesets/BindableRulesetSelector.cs | 8 +------- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/osu.Game/Overlays/Toolbar/ToolbarRulesetSelector.cs b/osu.Game/Overlays/Toolbar/ToolbarRulesetSelector.cs index d89418b50c..5cd061f3da 100644 --- a/osu.Game/Overlays/Toolbar/ToolbarRulesetSelector.cs +++ b/osu.Game/Overlays/Toolbar/ToolbarRulesetSelector.cs @@ -92,12 +92,7 @@ namespace osu.Game.Overlays.Toolbar private readonly Cached activeMode = new Cached(); - protected override void OnRulesetChanged(ValueChangedEvent e) - { - base.OnRulesetChanged(e); - - activeMode.Invalidate(); - } + protected override void OnRulesetChanged(ValueChangedEvent e) => activeMode.Invalidate(); protected override void UpdateAfterChildren() { diff --git a/osu.Game/Rulesets/BindableRulesetSelector.cs b/osu.Game/Rulesets/BindableRulesetSelector.cs index 8c9bbcea0d..d752088a25 100644 --- a/osu.Game/Rulesets/BindableRulesetSelector.cs +++ b/osu.Game/Rulesets/BindableRulesetSelector.cs @@ -15,12 +15,6 @@ namespace osu.Game.Rulesets Current.BindValueChanged(OnRulesetChanged); } - protected virtual void OnRulesetChanged(ValueChangedEvent e) - { - if (Current.Disabled) - { - return; - } - } + protected abstract void OnRulesetChanged(ValueChangedEvent e); } }