mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-14 17:14:07 +01:00
Delay evaluation of checkmark states...
... so that more menu item descriptions can be statically constructed once only
This commit is contained in:
@@ -1136,7 +1136,8 @@ MenuTable::BaseItemPtr Scrubber::Menu()
|
||||
item.flags,
|
||||
item.StatusTest
|
||||
? // a checkmark item
|
||||
Options{}.CheckState( (this->*item.StatusTest)() )
|
||||
Options{}.CheckTest( [&item](AudacityProject &project){
|
||||
return ( Scrubber::Get(project).*(item.StatusTest) )(); } )
|
||||
: // not a checkmark item
|
||||
Options{}
|
||||
) );
|
||||
|
||||
@@ -118,7 +118,7 @@ public:
|
||||
bool CanScrub() const;
|
||||
|
||||
// For the toolbar
|
||||
MenuTable::BaseItemPtr Menu();
|
||||
static MenuTable::BaseItemPtr Menu();
|
||||
// For popup
|
||||
void PopulatePopupMenu(wxMenu &menu);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user