From 10cdbc8fbc1fab67b0dbcac39afd1c88b02a0af9 Mon Sep 17 00:00:00 2001 From: stefnotch Date: Mon, 4 Jan 2021 12:33:29 +0100 Subject: [PATCH] Add dragging existing connection from input box --- Source/Editor/Surface/Elements/Box.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Source/Editor/Surface/Elements/Box.cs b/Source/Editor/Surface/Elements/Box.cs index 886ab1e37..9be0dfd97 100644 --- a/Source/Editor/Surface/Elements/Box.cs +++ b/Source/Editor/Surface/Elements/Box.cs @@ -565,7 +565,18 @@ namespace FlaxEditor.Surface.Elements { _isMouseDown = false; if (Surface.CanEdit) - Surface.ConnectingStart(this); + { + if (!IsOutput && HasSingleConnection) + { + var inputBox = Connections[0]; + BreakConnection(inputBox); + Surface.ConnectingStart(inputBox); + } + else + { + Surface.ConnectingStart(this); + } + } } base.OnMouseLeave(); }