| 1540 | |
| 1541 | #include "CommandManager.h" |
| 1542 | void ToolManager::ModifyToolbarMenus(AudacityProject &project) |
| 1543 | { |
| 1544 | // Refreshes can occur during shutdown and the toolmanager may already |
| 1545 | // be deleted, so protect against it. |
| 1546 | auto &toolManager = ToolManager::Get( project ); |
| 1547 | |
| 1548 | // Now, go through each toolbar, and call EnableDisableButtons() |
| 1549 | toolManager.ForEach([](auto bar){ |
| 1550 | if (bar) |
| 1551 | bar->EnableDisableButtons(); |
| 1552 | }); |
| 1553 | |
| 1554 | // These don't really belong here, but it's easier and especially so for |
| 1555 | // the Edit toolbar and the sync-lock menu item. |
| 1556 | bool active = SyncLockTracks.Read(); |
| 1557 | SyncLockState::Get(project).SetSyncLock(active); |
| 1558 | |
| 1559 | CommandManager::Get(project).UpdateCheckmarks(); |
| 1560 | } |
| 1561 | |
| 1562 | using namespace MenuRegistry; |
| 1563 |
no test coverage detected