Fix assertion in OnFullScreen command

This commit is contained in:
Paul Licameli 2020-02-01 13:00:02 -05:00
parent 7f4d61257a
commit eb86a1eab7
1 changed files with 5 additions and 3 deletions

View File

@ -227,18 +227,20 @@ BaseItemPtr ExtraMiscItems()
;
// Not a menu.
return ( FinderScope{ findCommandHandler },
return (
Items( wxT("Misc"),
// Delayed evaluation
[]( AudacityProject &project ) {
return
return (
FinderScope{ findCommandHandler },
// Accel key is not bindable.
Command( wxT("FullScreenOnOff"), XXO("&Full Screen (on/off)"),
FN(OnFullScreen),
AlwaysEnabledFlag,
Options{ key }.CheckTest( []( const AudacityProject &project ) {
return GetProjectFrame( project )
.wxTopLevelWindow::IsFullScreen(); } ) );
.wxTopLevelWindow::IsFullScreen(); } ) )
);
}
) );
}