[GraphEdit] Fix GraphNode's ports interactable through other GraphNodes
This commit is contained in:
parent
ce00392fc3
commit
6a067a4a80
1 changed files with 12 additions and 0 deletions
|
@ -898,6 +898,12 @@ bool GraphEdit::_filter_input(const Point2 &p_point) {
|
||||||
return true;
|
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;
|
return false;
|
||||||
|
@ -1027,6 +1033,12 @@ void GraphEdit::_top_connection_layer_input(const Ref<InputEvent> &p_ev) {
|
||||||
return;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue