From 13892cb13ed9d2850c2b70258a40713b0112d224 Mon Sep 17 00:00:00 2001 From: Jonathan Stone Date: Sun, 15 Dec 2024 10:18:35 -0800 Subject: [PATCH] Fix edge case with editor pasting (#2145) This changelist fixes the edge case of pasting with an empty copy buffer in the Graph Editor. Previously, this action would have an unintended effect on node positions, and it now has no impact on the graph. --- source/MaterialXGraphEditor/Graph.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/MaterialXGraphEditor/Graph.cpp b/source/MaterialXGraphEditor/Graph.cpp index aa04339469..d0602e45ec 100644 --- a/source/MaterialXGraphEditor/Graph.cpp +++ b/source/MaterialXGraphEditor/Graph.cpp @@ -4045,8 +4045,8 @@ void Graph::drawGraph(ImVec2 mousePos) for (std::map::iterator iter = _copiedNodes.begin(); iter != _copiedNodes.end(); iter++) { copyUiNode(iter->first); + _addNewNode = true; } - _addNewNode = true; } else {