You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-02 16:48:55 +00:00
Fix GraphEdit port snapping in certain edge cases
This commit is contained in:
@@ -912,7 +912,7 @@ bool GraphEdit::_filter_input(const Point2 &p_point) {
|
|||||||
|
|
||||||
// This prevents interactions with a port hotzone that is behind another node.
|
// 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);
|
Rect2 graph_node_rect = Rect2(graph_node->get_position(), graph_node->get_size() * zoom);
|
||||||
if (graph_node_rect.has_point(click_pos * zoom)) {
|
if (graph_node_rect.has_point(p_point)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1044,12 +1044,6 @@ 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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1121,6 +1115,12 @@ void GraphEdit::_top_connection_layer_input(const Ref<InputEvent> &p_ev) {
|
|||||||
}
|
}
|
||||||
connecting_target_valid = false;
|
connecting_target_valid = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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(mm->get_position())) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user