Removed the invalid right-click context menu from the Reference Viewer when clicking on the background.

#jira UE-13407 - Right clicking in Reference Viewer brings up context menu with non-functional search

[CL 2506581 by Richard TalbotWatkin in Main branch]
This commit is contained in:
Richard TalbotWatkin
2015-04-09 05:36:45 -04:00
committed by epic@richtech.es
parent dcbedf3fa6
commit d2d9771cb4
2 changed files with 11 additions and 0 deletions

View File

@@ -40,6 +40,7 @@ void SReferenceViewer::Construct( const FArguments& InArgs )
SGraphEditor::FGraphEditorEvents GraphEvents;
GraphEvents.OnNodeDoubleClicked = FSingleNodeEvent::CreateSP(this, &SReferenceViewer::OnNodeDoubleClicked);
GraphEvents.OnCreateActionMenu = SGraphEditor::FOnCreateActionMenu::CreateSP(this, &SReferenceViewer::OnCreateGraphActionMenu);
// Create the graph editor
GraphEditorPtr = SNew(SGraphEditor)
@@ -260,6 +261,12 @@ void SReferenceViewer::OnNodeDoubleClicked(UEdGraphNode* Node)
ReCenterGraphOnNodes( Nodes );
}
FActionMenuContent SReferenceViewer::OnCreateGraphActionMenu(UEdGraph* InGraph, const FVector2D& InNodePosition, const TArray<UEdGraphPin*>& InDraggedPins, bool bAutoExpand, SGraphEditor::FActionMenuClosed InOnMenuClosed)
{
// no context menu when not over a node
return FActionMenuContent();
}
bool SReferenceViewer::IsBackEnabled() const
{
return HistoryManager.CanGoBack();