diff --git a/Source/FlowEditor/Private/Graph/FlowGraphEditor.cpp b/Source/FlowEditor/Private/Graph/FlowGraphEditor.cpp index be579133..9bc264ec 100644 --- a/Source/FlowEditor/Private/Graph/FlowGraphEditor.cpp +++ b/Source/FlowEditor/Private/Graph/FlowGraphEditor.cpp @@ -2,18 +2,18 @@ #include "Graph/FlowGraphEditor.h" -#include "FlowEditorCommands.h" -#include "FlowEditorModule.h" - #include "Asset/FlowAssetEditor.h" #include "Asset/FlowDebuggerSubsystem.h" +#include "FlowEditorCommands.h" #include "Graph/FlowGraphEditorSettings.h" #include "Graph/FlowGraphSchema_Actions.h" #include "Graph/Nodes/FlowGraphNode.h" #include "Nodes/Route/FlowNode_SubGraph.h" +#include "EdGraphUtilities.h" #include "Framework/Application/SlateApplication.h" #include "Framework/Commands/GenericCommands.h" +#include "GraphEditorActions.h" #include "HAL/PlatformApplicationMisc.h" #include "IDetailsView.h" #include "LevelEditor.h" @@ -644,14 +644,11 @@ void SFlowGraphEditor::PasteNodesHere(const FVector2D& Location) FlowGraph->LockUpdates(); UFlowGraphNode* SelectedParent = nullptr; - bool bHasMultipleNodesSelected = false; const FGraphPanelSelectionSet SelectedNodes = GetSelectedNodes(); for (FGraphPanelSelectionSet::TConstIterator SelectedIter(SelectedNodes); SelectedIter; ++SelectedIter) { - UFlowGraphNode* Node = Cast(*SelectedIter); - - if (Node) + if (UFlowGraphNode* Node = Cast(*SelectedIter)) { if (SelectedParent == nullptr) { @@ -659,8 +656,6 @@ void SFlowGraphEditor::PasteNodesHere(const FVector2D& Location) } else { - bHasMultipleNodesSelected = true; - break; } } @@ -703,8 +698,6 @@ void SFlowGraphEditor::PasteNodesHere(const FVector2D& Location) AvgNodePosition.Y *= InvNumNodes; } - bool bPastedParentNode = false; - TMap EdNodeCopyIndexMap; for (TSet::TIterator It(PastedNodes); It; ++It) { @@ -715,8 +708,6 @@ void SFlowGraphEditor::PasteNodesHere(const FVector2D& Location) if (PasteNode && (PasteFlowGraphNode == nullptr || !PasteFlowGraphNode->IsSubNode())) { - bPastedParentNode = true; - // Select the newly pasted stuff constexpr bool bSelectNodes = true; SetNodeSelection(PasteNode, bSelectNodes); diff --git a/Source/FlowEditor/Public/Graph/FlowGraphEditor.h b/Source/FlowEditor/Public/Graph/FlowGraphEditor.h index fa873ce3..24881c1d 100644 --- a/Source/FlowEditor/Public/Graph/FlowGraphEditor.h +++ b/Source/FlowEditor/Public/Graph/FlowGraphEditor.h @@ -2,10 +2,7 @@ #pragma once -#include "EdGraphUtilities.h" #include "GraphEditor.h" -#include "GraphEditorActions.h" -#include "SGraphNode.h" #include "Widgets/DeclarativeSyntaxSupport.h" #include "FlowGraph.h"