mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-13 08:06:32 +01:00
easy change key bindings
This commit is contained in:
@@ -1479,9 +1479,25 @@ bool CommandManager::HandleCommandEntry(const CommandListEntry * entry,
|
||||
///CommandManagerListener function. If you pass any flags,
|
||||
///the command won't be executed unless the flags are compatible
|
||||
///with the command's flags.
|
||||
#include "../prefs/PrefsDialog.h"
|
||||
#include "../prefs/KeyConfigPrefs.h"
|
||||
bool CommandManager::HandleMenuID(int id, CommandFlag flags, CommandMask mask)
|
||||
{
|
||||
CommandListEntry *entry = mCommandIDHash[id];
|
||||
|
||||
#ifdef EXPERIMENTAL_EASY_CHANGE_KEY_BINDINGS
|
||||
if (::wxGetMouseState().ShiftDown()) {
|
||||
// Only want one page of the preferences
|
||||
KeyConfigPrefsFactory keyConfigPrefsFactory{ entry->name };
|
||||
PrefsDialog::Factories factories;
|
||||
factories.push_back(&keyConfigPrefsFactory);
|
||||
GlobalPrefsDialog dialog(GetActiveProject(), factories);
|
||||
dialog.ShowModal();
|
||||
AudacityProject::RebuildAllMenuBars();
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
return HandleCommandEntry( entry, flags, mask );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user