1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-04-23 06:23:49 +02:00

Restore separators after "Move Track to Bottom" in TCP menus

This commit is contained in:
Paul Licameli
2020-02-06 16:51:54 -05:00
parent 3d5b0d4dd0
commit 540f2c5e67
4 changed files with 22 additions and 12 deletions

View File

@@ -20,6 +20,7 @@ PopupSubMenu::~PopupSubMenu()
PopupSubMenu::PopupSubMenu( const Identifier &stringId,
const TranslatableString &caption_, PopupMenuTable &table )
: ConcreteGroupItem< false >{ stringId }
, WholeMenu{ caption_.empty() }
, caption{ caption_ }
{
}

View File

@@ -53,6 +53,7 @@ struct PopupMenuTableEntry : Registry::SingleItem
};
struct PopupSubMenu : Registry::ConcreteGroupItem< false >
, MenuTable::WholeMenu
{
TranslatableString caption;
@@ -103,8 +104,7 @@ public:
// More items get added to the end of it
static void ExtendMenu( wxMenu &menu, PopupMenuTable &otherTable );
using Entries = std::vector<PopupMenuTableEntry>;
const std::shared_ptr< PopupSubMenu > &Get()
const std::shared_ptr< Registry::GroupItem > &Get()
{
if (!mTop)
Populate();
@@ -115,7 +115,7 @@ protected:
virtual void Populate() = 0;
void Clear() { mTop.reset(); }
std::shared_ptr< PopupSubMenu > mTop;
std::shared_ptr< Registry::GroupItem > mTop;
std::vector< Registry::GroupItem* > mStack;
Identifier mId;
TranslatableString mCaption;