1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-03-07 23:15:36 +01:00

Use class MenuSection in visitors

This commit is contained in:
Paul Licameli
2020-01-29 16:31:35 -05:00
parent d84c994088
commit c7fac7ae09
3 changed files with 57 additions and 17 deletions

View File

@@ -371,8 +371,11 @@ struct MenuItemVisitor : MenuVisitor
flags.push_back(flag);
}
else
if (const auto pGroup = dynamic_cast<GroupItem*>( pItem )) {
wxASSERT( pGroup->Transparent() );
if ( pItem->Transparent() ) {
}
else
if ( const auto pGroup = dynamic_cast<MenuSection*>( pItem ) ) {
manager.AddSeparator();
}
else
wxASSERT( false );
@@ -394,8 +397,11 @@ struct MenuItemVisitor : MenuVisitor
flags.pop_back();
}
else
if (const auto pGroup = dynamic_cast<GroupItem*>( pItem )) {
wxASSERT( pGroup->Transparent() );
if ( pItem->Transparent() ) {
}
else
if ( const auto pGroup = dynamic_cast<MenuSection*>( pItem ) ) {
manager.AddSeparator();
}
else
wxASSERT( false );