mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
macOS: Prevent mac menu bar submenus with empty names being used as the recent items menu
This commit is contained in:
parent
5360191737
commit
b0934f896c
1 changed files with 3 additions and 3 deletions
|
|
@ -249,10 +249,10 @@ public:
|
|||
}
|
||||
else if (i.subMenu != nullptr)
|
||||
{
|
||||
if (i.text == recentItemsMenuName)
|
||||
if (recentItemsMenuName.isNotEmpty() && i.text == recentItemsMenuName)
|
||||
{
|
||||
if (recent == nullptr)
|
||||
recent.reset (new RecentFilesMenuItem());
|
||||
recent = std::make_unique<RecentFilesMenuItem>();
|
||||
|
||||
if (recent->recentItem != nil)
|
||||
{
|
||||
|
|
@ -572,7 +572,7 @@ public:
|
|||
: oldMenu (MenuBarModel::getMacMainMenu())
|
||||
{
|
||||
if (auto* appleMenu = MenuBarModel::getMacExtraAppleItemsMenu())
|
||||
oldAppleMenu.reset (new PopupMenu (*appleMenu));
|
||||
oldAppleMenu = std::make_unique<PopupMenu> (*appleMenu);
|
||||
|
||||
if (auto* handler = JuceMainMenuHandler::instance)
|
||||
oldRecentItems = handler->recentItemsMenuName;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue