Hi Jules,
restoreFromXml does not work correctly when there are “unmapping” entries in the xml, for example if the user has exchanged the keypresses associated to two commands.
Replacing:
if (containsMapping (commandId, key))
removeKeyPress (key);
with
for (int i = mappings.size(); --i >= 0;)
if (mappings.getUnchecked(i)->commandID == commandId)
mappings.getUnchecked(i)->keypresses.removeAllInstancesOf(key);
fixes these issues (an alternative solution would be to store all the ‘unmapping’ entries before the ‘mapping’ entries in the xml)