Skip to content

Commit ef61ce1

Browse files
authored
Fix false empty entry in custom submenus (#2551)
Fix empty placeholder in custom submenus
1 parent 2e2f681 commit ef61ce1

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎Src/StartMenu/StartMenuDLL/MenuContainer.cpp‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2537,10 +2537,11 @@ void CMenuContainer::InitItems( void )
25372537
}
25382538
}
25392539

2540-
if (m_Items.empty() && m_Path1[0] && m_pDropFolder[0])
2540+
if (!m_bSubMenu && m_Items.empty() && m_Path1[0] && m_pDropFolder[0])
25412541
{
2542-
// add (Empty) item to the empty submenus
2543-
MenuItem item(m_bSubMenu?MENU_EMPTY:MENU_EMPTY_TOP);
2542+
// Keep the top-level drop target placeholder. Submenus defer their
2543+
// empty-state decision until after custom/standard items are appended.
2544+
MenuItem item(MENU_EMPTY_TOP);
25442545
item.name=FindTranslation(L"Menu.Empty",L"(Empty)");
25452546
m_Items.push_back(item);
25462547
}

0 commit comments

Comments
 (0)