1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-06 23:29:24 +02:00

Exception safety in: CommandManager

This commit is contained in:
Paul Licameli 2016-11-24 17:17:37 -05:00
parent 40aa70a255
commit abbe9276f0

View File

@ -1127,10 +1127,9 @@ bool CommandManager::FilterKeyEvent(AudacityProject *project, const wxKeyEvent &
// rest of the command handling. But, to use the common handler, we
// enable them temporarily and then disable them again after handling.
// LL: Why do they need to be disabled???
entry->enabled = true;
bool ret = HandleCommandEntry(entry, NoFlagsSpecifed, NoFlagsSpecifed, &evt);
entry->enabled = false;
return ret;
auto cleanup = valueRestorer( entry->enabled, true );
return HandleCommandEntry(entry, NoFlagsSpecifed, NoFlagsSpecifed, &evt);
}
// Any other keypresses must be destined for this project window.