mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-02 16:49:41 +02:00
Bug 1762: Importing keystrokes not in standard set
Problem: 1. Use either no prior config files, or set the default shortcuts to standard. 2. If a set of keyboard shortcuts is imported, then any shortcut for a command which only has a default shortcut in the full set is not set, unless it differs from the default shortcut. This occurs because in CommandManager::HandleXMLTag(), the imported shortcut is only used if it's different from the default shortcut. But for all commands, even those commands which only have a default shortcut in the full set, GetDefaultKeyFromName() returns the default shortcut. Fix: Use the imported shortcut, regardless of whether it is different from the default shortcut. (I've left the function GetDefaultKeyFromName(), even though it is not longer used.) Note: This results in a change of behaviour: Before: if you'd customized the shortcut for a command, then if you imported a set of shortcuts, that customized shortcut would only have been changed if the imported shortcut was also customized. Now: If you import a set of shortcuts, then these become your shortcuts, regardless of any customizations present before the import. I think the new behaviour is what a user would expect.
This commit is contained in:
parent
ee0a438093
commit
d994ad430a
@ -1811,10 +1811,8 @@ bool CommandManager::HandleXMLTag(const wxChar *tag, const wxChar **attrs)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (mCommandNameHash[name]) {
|
if (mCommandNameHash[name]) {
|
||||||
if (GetDefaultKeyFromName(name) != key) {
|
mCommandNameHash[name]->key = key;
|
||||||
mCommandNameHash[name]->key = key;
|
mXMLKeysRead++;
|
||||||
mXMLKeysRead++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user