SourceControl: Replace main menu "Submit" menu with "View Changelists..."

#rb sebastien.lussier

#ROBOMERGE-SOURCE: CL 15725157 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v781-15675533)

[CL 15727212 by patrick enfedaque in ue5-main branch]
This commit is contained in:
patrick enfedaque
2021-03-17 13:43:31 -04:00
parent b69c00a2ea
commit 925afa781b
7 changed files with 36 additions and 55 deletions

View File

@@ -3,6 +3,7 @@
#include "CoreMinimal.h"
#include "Modules/ModuleManager.h"
#include "ISourceControlWindowsModule.h"
#include "ISourceControlModule.h"
#include "Widgets/Docking/SDockTab.h"
#include "Textures/SlateIcon.h"
@@ -34,6 +35,7 @@ public:
virtual void ShutdownModule() override;
virtual void ShowChangelistsTab() override;
virtual bool CanShowChangelistsTab() const override;
private:
TSharedRef<SDockTab> CreateChangelistsTab(const FSpawnTabArgs& Args);
@@ -119,4 +121,16 @@ void FSourceControlWindowsModule::ShowChangelistsTab()
FGlobalTabmanager::Get()->TryInvokeTab(FTabId(SourceControlChangelistsTabName));
}
bool FSourceControlWindowsModule::CanShowChangelistsTab() const
{
ISourceControlModule& SourceControlModule = ISourceControlModule::Get();
if (ISourceControlModule::Get().IsEnabled() &&
ISourceControlModule::Get().GetProvider().IsAvailable())
{
return true;
}
return false;
}
#undef LOCTEXT_NAMESPACE