fixed bug with default shortcut keys

This commit is contained in:
codeimp 2008-10-16 09:23:25 +00:00
parent 800dc6a620
commit 67747188ca

View file

@ -409,6 +409,9 @@ namespace CodeImp.DoomBuilder.Actions
{ {
// Find actions that have no key set // Find actions that have no key set
foreach(KeyValuePair<string, Action> a in actions) foreach(KeyValuePair<string, Action> a in actions)
{
// Key set?
if(a.Value.ShortcutKey == -1)
{ {
// Check if the default key is not already used // Check if the default key is not already used
bool keyused = false; bool keyused = false;
@ -430,6 +433,12 @@ namespace CodeImp.DoomBuilder.Actions
// Apply the default key // Apply the default key
a.Value.SetShortcutKey(a.Value.DefaultShortcutKey); a.Value.SetShortcutKey(a.Value.DefaultShortcutKey);
} }
else
{
// No party.
a.Value.SetShortcutKey(0);
}
}
} }
} }