search Commands collection before calling FindCommandInternal (can't remember why...)

This commit is contained in:
Michael Becker 2021-04-29 22:32:59 -04:00
parent 0f4f520963
commit ba7f6a497a
No known key found for this signature in database
GPG Key ID: 98C333A81F18C22C

View File

@ -56,7 +56,10 @@ namespace MBS.Framework
} }
public Command FindCommand(string commandID) 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; if (cmd != null) return cmd;
foreach (Context ctx in Contexts) foreach (Context ctx in Contexts)
@ -65,8 +68,6 @@ namespace MBS.Framework
if (cmd != null) return cmd; if (cmd != null) return cmd;
} }
cmd = Commands[commandID];
if (cmd != null) return cmd;
return null; return null;
} }