summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scene/gui/graph_edit.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp
index d5ad258df8..c9f3fc1dfe 100644
--- a/scene/gui/graph_edit.cpp
+++ b/scene/gui/graph_edit.cpp
@@ -898,6 +898,12 @@ bool GraphEdit::_filter_input(const Point2 &p_point) {
return true;
}
}
+
+ // This prevents interactions with a port hotzone that is behind another node.
+ Rect2 graph_node_rect = Rect2(graph_node->get_position(), graph_node->get_size() * zoom);
+ if (graph_node_rect.has_point(click_pos * zoom)) {
+ break;
+ }
}
return false;
@@ -1027,6 +1033,12 @@ void GraphEdit::_top_connection_layer_input(const Ref<InputEvent> &p_ev) {
return;
}
}
+
+ // This prevents interactions with a port hotzone that is behind another node.
+ Rect2 graph_node_rect = Rect2(graph_node->get_position(), graph_node->get_size() * zoom);
+ if (graph_node_rect.has_point(click_pos * zoom)) {
+ break;
+ }
}
}