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

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.

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.

Hey -

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

Cheers