Merge pull request #10553 from bdach/fix-key-counter-order

Fix key counter actions displaying out of order
This commit is contained in:
Dan Balasescu 2020-10-19 13:44:08 +09:00 committed by GitHub
commit 408183fdf9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -136,7 +136,11 @@ public void Attach(KeyCounterDisplay keyCounter)
KeyBindingContainer.Add(receptor);
keyCounter.SetReceptor(receptor);
keyCounter.AddRange(KeyBindingContainer.DefaultKeyBindings.Select(b => b.GetAction<T>()).Distinct().Select(b => new KeyCounterAction<T>(b)));
keyCounter.AddRange(KeyBindingContainer.DefaultKeyBindings
.Select(b => b.GetAction<T>())
.Distinct()
.OrderBy(action => action)
.Select(action => new KeyCounterAction<T>(action)));
}
public class ActionReceptor : KeyCounterDisplay.Receptor, IKeyBindingHandler<T>