1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-21 14:02:57 +02:00

MenuCommandHandler is not a base class of MenuManager...

... This forces a better placement of state variables in the appropriate
classes.

In future perhaps, MenuManager should be splintered into several classes, one
for each of the main toolbar menus.
This commit is contained in:
Paul Licameli
2018-10-15 14:07:32 -04:00
committed by James Crook
parent d693b36bdb
commit fc6570646d
11 changed files with 75 additions and 56 deletions

View File

@@ -1484,7 +1484,7 @@ bool CommandManager::FilterKeyEvent(AudacityProject *project, const wxKeyEvent &
return false;
}
auto flags = GetMenuCommandHandler(*project).GetUpdateFlags(*project);
auto flags = GetMenuManager(*project).GetUpdateFlags(*project);
wxKeyEvent temp = evt;
@@ -1579,7 +1579,7 @@ bool CommandManager::HandleCommandEntry(const CommandListEntry * entry,
NiceName.Replace(".","");// remove ...
// NB: The call may have the side effect of changing flags.
bool allowed =
GetMenuCommandHandler(*proj).ReportIfActionNotAllowed( *proj,
GetMenuManager(*proj).ReportIfActionNotAllowed( *proj,
NiceName, flags, entry->flags, combinedMask );
// If the function was disallowed, it STILL should count as having been
// handled (by doing nothing or by telling the user of the problem).