Files
UnrealEngineUWP/Engine/Source/Editor/GraphEditor/Private/MaterialNodes/SGraphNodeMaterialComment.cpp
daren cheng 1c7588384a Edigrate 16359780.
Don't create transactions except on release when moving nodes.

#jira UE-115317
#rb Francis.Hurteau, Patrick.Boutot
#preflight 60a3ff23733ad00001685c6a

#ROBOMERGE-SOURCE: CL 16373994 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v804-16311228)

[CL 16374025 by daren cheng in ue5-release-engine-test branch]
2021-05-18 15:27:53 -04:00

28 lines
1.0 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "MaterialNodes/SGraphNodeMaterialComment.h"
#include "Materials/MaterialExpressionComment.h"
#include "MaterialGraph/MaterialGraphNode_Comment.h"
void SGraphNodeMaterialComment::Construct(const FArguments& InArgs, class UMaterialGraphNode_Comment* InNode)
{
SGraphNodeComment::Construct(SGraphNodeComment::FArguments(), InNode);
this->CommentNode = InNode;
}
void SGraphNodeMaterialComment::MoveTo(const FVector2D& NewPosition, FNodeSet& NodeFilter, bool bMarkDirty)
{
if( !NodeFilter.Find( SharedThis( this ) ))
{
SGraphNodeComment::MoveTo(NewPosition, NodeFilter, bMarkDirty);
if (CommentNode && CommentNode->MaterialExpressionComment)
{
CommentNode->MaterialExpressionComment->MaterialExpressionEditorX = CommentNode->NodePosX;
CommentNode->MaterialExpressionComment->MaterialExpressionEditorY = CommentNode->NodePosY;
CommentNode->MaterialExpressionComment->MarkPackageDirty();
CommentNode->MaterialDirtyDelegate.ExecuteIfBound();
}
}
}