# \[4.7.0-BUG\]  Two menu entry for one tab spawner

**URL:** <https://forums.unrealengine.com/t/4-7-0-bug-two-menu-entry-for-one-tab-spawner/306073>\
**Category:** Plugins\
**Tags:** unreal-engine, bug-report, editor, Plugins, CPP, question\
**Created:** [February 5, 2015, 4:49pm UTC](https://forums.unrealengine.com/t/4-7-0-bug-two-menu-entry-for-one-tab-spawner/306073 "2015-02-05T16:49:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![omigamedev](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@omigamedev](https://forums.unrealengine.com/u/omigamedev)\
**Post date:** [February 5, 2015, 4:49pm UTC](https://forums.unrealengine.com/t/4-7-0-bug-two-menu-entry-for-one-tab-spawner/306073/1 "2015-02-05T16:49:10Z")

</div>

Hi I’ve just noticed that after registering a tab spawner in my plugin:

```
void SMainTab::RegisterTab()
{
    FGlobalTabmanager::Get()->RegisterNomadTabSpawner(TabID,
        FOnSpawnTab::CreateStatic(&ThisClass::SpawnTab))
        .SetDisplayName(FText::FromString(TEXT("ThePlugin")))
        .SetMenuType(ETabSpawnerMenuType::Enabled);
}

```

This is what happens after launching.

 ![29062-ue4-menu-bug.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/e/b/beb8341edf4c8744a401cc9046a8eddbd2cb2c3a.jpeg)

After debugging I found the problem is in the MainFrame module in **MainMenu::FillWindowMenu:162**

```
// Automatically populate tab spawners from TabManager
if (TabManager.IsValid())
{
	// Local editor tabs
	TabManager->PopulateLocalTabSpawnerMenu(MenuBuilder);
	
	// General tabs
	const IWorkspaceMenuStructure& MenuStructure = WorkspaceMenu::GetMenuStructure();
	TabManager->PopulateTabSpawnerMenu(MenuBuilder, MenuStructure.GetStructureRoot());
}

```

It looks like removing the first call to PopulateLocalTabSpawnerMenu **eliminates the problem**.  
These two lines end up calling **FTabManager::PopulateTabSpawnerMenu** twice, adding two menu entries.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [February 9, 2015, 9:53pm UTC](https://forums.unrealengine.com/t/4-7-0-bug-two-menu-entry-for-one-tab-spawner/306073/2 "2015-02-09T21:53:44Z")

</div>

Hey -

Thanks for bringing this to our attention. I have submitted this to our internal tracking database for further investigation (UE-9478).

Cheers
