Skip to content

Commit

Permalink
Fix keyboard error with empty keygroup
Browse files Browse the repository at this point in the history
  • Loading branch information
kmcnaught committed Mar 14, 2023
1 parent 5381f00 commit 681e39e
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -862,10 +862,13 @@ private void CreateDynamicKey(XmlDynamicKey xmlKey, KeyValue xmlKeyValue, int mi
//add this item's KeyValue to each KeyGroup referenced in its definition
foreach (KeyGroup vKeyGroup in xmlKey.KeyGroups)
{
if (!keyValueByGroup.ContainsKey(vKeyGroup.Value.ToUpper()))
keyValueByGroup.Add(vKeyGroup.Value.ToUpper(), new List<KeyValue> { xmlKeyValue });
else if (!keyValueByGroup[vKeyGroup.Value.ToUpper()].Contains(xmlKeyValue))
keyValueByGroup[vKeyGroup.Value.ToUpper()].Add(xmlKeyValue);
if (vKeyGroup.Value != null)
{
if (!keyValueByGroup.ContainsKey(vKeyGroup.Value.ToUpper()))
keyValueByGroup.Add(vKeyGroup.Value.ToUpper(), new List<KeyValue> { xmlKeyValue });
else if (!keyValueByGroup[vKeyGroup.Value.ToUpper()].Contains(xmlKeyValue))
keyValueByGroup[vKeyGroup.Value.ToUpper()].Add(xmlKeyValue);
}
}

if (xmlKey.Label != null)
Expand Down

0 comments on commit 681e39e

Please sign in to comment.