You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
warning V1043: A global object variable 'XYZ' is declared in the header. Multiple copies of it will be created in all translation units that include this header When we are 100% C++17, we could use the inline keyword instead of making things extern. #rb trivial #jira UE-91644 [CL 15048553 by Tim Smith in ue5-main branch]
46 lines
1.3 KiB
C++
46 lines
1.3 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "UndoHistoryModule.h"
|
|
#include "EditorStyleSet.h"
|
|
#include "Widgets/SUndoHistory.h"
|
|
#include "Widgets/Docking/SDockTab.h"
|
|
|
|
#define LOCTEXT_NAMESPACE "FUndoHistoryModule"
|
|
|
|
const FName UndoHistoryTabName("UndoHistory");
|
|
|
|
void FUndoHistoryModule::StartupModule()
|
|
{
|
|
FGlobalTabmanager::Get()->RegisterNomadTabSpawner(UndoHistoryTabName, FOnSpawnTab::CreateRaw(this, &FUndoHistoryModule::HandleSpawnSettingsTab))
|
|
.SetDisplayName(NSLOCTEXT("FUndoHistoryModule", "UndoHistoryTabTitle", "Undo History"))
|
|
.SetTooltipText(NSLOCTEXT("FUndoHistoryModule", "UndoHistoryTooltipText", "Open the Undo History tab."))
|
|
.SetIcon(FSlateIcon(FEditorStyle::GetStyleSetName(), "UndoHistory.TabIcon"))
|
|
.SetAutoGenerateMenuEntry(false);
|
|
}
|
|
|
|
void FUndoHistoryModule::ShutdownModule()
|
|
{
|
|
FGlobalTabmanager::Get()->UnregisterNomadTabSpawner(UndoHistoryTabName);
|
|
}
|
|
|
|
bool FUndoHistoryModule::SupportsDynamicReloading()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
TSharedRef<SDockTab> FUndoHistoryModule::HandleSpawnSettingsTab(const FSpawnTabArgs& SpawnTabArgs)
|
|
{
|
|
const TSharedRef<SDockTab> DockTab = SNew(SDockTab)
|
|
.TabRole(ETabRole::NomadTab);
|
|
|
|
DockTab->SetContent(SNew(SUndoHistory));
|
|
|
|
return DockTab;
|
|
}
|
|
|
|
|
|
IMPLEMENT_MODULE(FUndoHistoryModule, UndoHistory);
|
|
|
|
|
|
#undef LOCTEXT_NAMESPACE
|