summaryrefslogtreecommitdiff
path: root/scene/gui/graph_edit.cpp
diff options
context:
space:
mode:
authorYuri Roubinsky <chaosus89@gmail.com>2020-07-05 10:19:22 +0300
committerGitHub <noreply@github.com>2020-07-05 10:19:22 +0300
commit17f5ebc4e85b76ca780c332ecb657132f28e704d (patch)
treed94eab60d1a342860f888e88d569e5d8c33f56ed /scene/gui/graph_edit.cpp
parent583b6c9073a3add5777d2d9074d03f3c165b010c (diff)
parentd131bbaf157d1fad2aea448802a7b2c62b909d08 (diff)
Merge pull request #40128 from Chaosus/graphedit_reconnect_fix
Fix GraphEdit reconnecting to disconnected port
Diffstat (limited to 'scene/gui/graph_edit.cpp')
-rw-r--r--scene/gui/graph_edit.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp
index 8e5ac83acb..1ea790fc4f 100644
--- a/scene/gui/graph_edit.cpp
+++ b/scene/gui/graph_edit.cpp
@@ -471,7 +471,7 @@ void GraphEdit::_top_layer_input(const Ref<InputEvent> &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<Texture2D> port = get_theme_icon("port", "GraphNode");