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.
if (containsMapping (commandId, key))
for (int i = mappings.size(); --i >= 0;)
if (mappings.getUnchecked(i)->commandID == commandId)
fixes these issues (an alternative solution would be to store all the ‘unmapping’ entries before the ‘mapping’ entries in the xml)