Skip to content

Fix false empty entry in custom submenus - #2551

Merged
ge0rdi merged 1 commit into
Open-Shell:masterfrom
YellowNest:fix/issue-2543-custom-submenu-empty
Oct 5, 2026
Merged

ge0rdi merged 1 commit into
Open-Shell:masterfrom
YellowNest:fix/issue-2543-custom-submenu-empty

Conversation

@YellowNest

Copy link
Copy Markdown

Summary

Avoid inserting the (Empty) placeholder into custom submenus before their configured child items are appended.

For a custom item that points to a link and also has configured submenu children, InitItems() could add MENU_EMPTY immediately after shell enumeration returned no items. AddStandardItems() then appended the configured child items and inserted a separator because the menu was no longer empty, resulting in:

(Empty)
separator
configured submenu item

Submenus now defer the empty-state decision until after custom/standard items have been appended. The existing top-level drop-target placeholder behavior is preserved.

Verification

  • Fresh GitHub Actions Build passed for exact commit 479d3b15792acafdb78cf063934e4ca4ec1f307d.
  • Change is limited to the early empty-placeholder condition in CMenuContainer::InitItems().
  • Normal empty submenus are still handled by the existing final m_Items.empty() check after AddStandardItems().

Build:
https://github.com/YellowNest/Open-Shell-Menu/actions/runs/37220700506

Fixes #2543

YellowNest added a commit to YellowNest/Open-Shell-Menu that referenced this pull request Oct 4, 2026
Bundle current master with pending PRs Open-Shell#2547, Open-Shell#2548, Open-Shell#2551, Open-Shell#2552, and Open-Shell#2553 for local integration testing. This branch is test packaging only and is not intended for upstream merge.
@ge0rdi
ge0rdi merged commit ef61ce1 into Open-Shell:master Oct 5, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Custom Menu which links to a file, when submenu are created in it, it leaves "Empty" slot

2 participants