Correct and simplify KeyBindingStore

This commit is contained in:
Dean Herbert
2017-10-16 17:58:17 +09:00
parent acc299c7b9
commit 9ee6d1e3f9
2 changed files with 19 additions and 15 deletions

View File

@ -37,8 +37,10 @@ namespace osu.Game.Overlays.KeyBinding
foreach (var defaultGroup in Defaults.GroupBy(d => d.Action))
{
int intKey = (int)defaultGroup.Key;
// one row per valid action.
Add(new KeyBindingRow(defaultGroup.Key, bindings.Where(b => b.Action.Equals((int)defaultGroup.Key)))
Add(new KeyBindingRow(defaultGroup.Key, bindings.Where(b => ((int)b.Action).Equals(intKey)))
{
AllowMainMouseButtons = Ruleset != null,
Defaults = defaultGroup.Select(d => d.KeyCombination)