From ba7f6a497a21e9e5d242ba308018e1239ea85a45 Mon Sep 17 00:00:00 2001 From: Michael Becker Date: Thu, 29 Apr 2021 22:32:59 -0400 Subject: [PATCH] search Commands collection before calling FindCommandInternal (can't remember why...) --- MBS.Framework/Application.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/MBS.Framework/Application.cs b/MBS.Framework/Application.cs index 03ceb0e..fffc39d 100644 --- a/MBS.Framework/Application.cs +++ b/MBS.Framework/Application.cs @@ -56,7 +56,10 @@ namespace MBS.Framework } public Command FindCommand(string commandID) { - Command cmd = FindCommandInternal(commandID); + Command cmd = Commands[commandID]; + if (cmd != null) return cmd; + + cmd = FindCommandInternal(commandID); if (cmd != null) return cmd; foreach (Context ctx in Contexts) @@ -65,8 +68,6 @@ namespace MBS.Framework if (cmd != null) return cmd; } - cmd = Commands[commandID]; - if (cmd != null) return cmd; return null; }