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.