mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-01 16:19:43 +02:00
Bug 1786: duplicate shortcuts can be created
Problem: When [gui/shortcuts]fulldefaults is true, then you can't clear the shortcut of a command which is only in the full set. In bool KeyConfigPrefs::Commit(), for a command only in the full set, dkey = "", so if the key is set to "", there will be no entry in NewKeys for this. In CommandListEntry *CommandManager::NewIdentifier, if [gui/shortcuts]fulldefaults is true, then for all commands the key is initially set to the default. For the shortcut that should have been cleared, there is no entry in NewKeys to override this, so it is in fact not cleared. Fix: In bool KeyConfigPrefs::Commit(), when [gui/shortcuts]fulldefaults is true, use the full set of defaults to find the default key.
This commit is contained in:
parent
2a08a3cc07
commit
a1c03d0f7d
@ -676,8 +676,9 @@ bool KeyConfigPrefs::Commit()
|
||||
ShuttleGui S(this, eIsSavingToPrefs);
|
||||
PopulateOrExchange(S);
|
||||
|
||||
bool bFull = gPrefs->ReadBool(wxT("/GUI/Shortcuts/FullDefaults"), false);
|
||||
for (size_t i = 0; i < mNames.GetCount(); i++) {
|
||||
wxString dkey = KeyStringNormalize(mStandardDefaultKeys[i]);
|
||||
wxString dkey = bFull ? KeyStringNormalize(mDefaultKeys[i]) : KeyStringNormalize(mStandardDefaultKeys[i]);
|
||||
wxString name = wxT("/NewKeys/") + mNames[i];
|
||||
wxString key = KeyStringNormalize(mNewKeys[i]);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user