Skip to content

Commit

Permalink
Merge pull request godotengine#91991 from Geometror/ge-fix-port-inter…
Browse files Browse the repository at this point in the history
…actions-node-order

[GraphEdit] Fix GraphNode's ports interactable through other GraphNodes
  • Loading branch information
akien-mga committed May 15, 2024
2 parents 4bb8c06 + 6a067a4 commit c27f24d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions scene/gui/graph_edit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
}
}

Expand Down

0 comments on commit c27f24d

Please sign in to comment.