From 3ad676cbbe1db53177b8ec75f0b9dc9517d90639 Mon Sep 17 00:00:00 2001 From: Yuri Roubinsky Date: Sun, 5 Jul 2020 09:47:58 +0300 Subject: [PATCH] Fix GraphEdit reconnecting to disconnected port, cherry-picked for 3.x --- scene/gui/graph_edit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp index 73ca838e596..03d7972eb23 100644 --- a/scene/gui/graph_edit.cpp +++ b/scene/gui/graph_edit.cpp @@ -677,7 +677,7 @@ void GraphEdit::_top_layer_input(const Ref &p_ev) { connecting_to = mm->get_position(); connecting_target = false; top_layer->update(); - connecting_valid = click_pos.distance_to(connecting_to) > 20.0 * zoom; + connecting_valid = just_disconnected || click_pos.distance_to(connecting_to) > 20.0 * zoom; if (connecting_valid) { Ref port = get_icon("port", "GraphNode");