diff options
author | Hendrik Brucker <hendrik.brucker@mail.de> | 2023-04-07 17:44:37 +0200 |
---|---|---|
committer | Yuri Sizov <yuris@humnom.net> | 2023-04-07 17:44:37 +0200 |
commit | e656a53ed09f679c0623d5b96707e2269a12aaaf (patch) | |
tree | d81eca9f1cceb5763fc4f77324a568ed0c3fc38b | |
parent | 861399fbe58c05633cb51eaf381d976ed59e122a (diff) |
Fix several GraphEdit operations at zoom levels other than 100%
(cherry picked from commit 49587fd6d940f11d40e7a324f2829f88c7204a11)
-rw-r--r-- | scene/gui/graph_edit.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp index 9c0c25b1ac..946e8a2ad5 100644 --- a/scene/gui/graph_edit.cpp +++ b/scene/gui/graph_edit.cpp @@ -533,7 +533,6 @@ void GraphEdit::_notification(int p_what) { void GraphEdit::_update_comment_enclosed_nodes_list(GraphNode *p_node, HashMap<StringName, Vector<GraphNode *>> &p_comment_enclosed_nodes) { Rect2 comment_node_rect = p_node->get_rect(); - comment_node_rect.size *= zoom; Vector<GraphNode *> enclosed_nodes; for (int i = 0; i < get_child_count(); i++) { @@ -543,7 +542,6 @@ void GraphEdit::_update_comment_enclosed_nodes_list(GraphNode *p_node, HashMap<S } Rect2 node_rect = gn->get_rect(); - node_rect.size *= zoom; bool included = comment_node_rect.encloses(node_rect); if (included) { @@ -806,7 +804,6 @@ bool GraphEdit::_check_clickable_control(Control *p_control, const Vector2 &mpos } Rect2 control_rect = p_control->get_rect(); - control_rect.size *= zoom; control_rect.position *= zoom; control_rect.position += p_offset; @@ -873,7 +870,6 @@ bool GraphEdit::is_in_port_hotzone(const Vector2 &p_pos, const Vector2 &p_mouse_ continue; } Rect2 child_rect = child->get_rect(); - child_rect.size *= zoom; if (child_rect.has_point(p_mouse_pos * zoom)) { for (int j = 0; j < child->get_child_count(); j++) { @@ -1169,7 +1165,6 @@ void GraphEdit::gui_input(const Ref<InputEvent> &p_ev) { } Rect2 r = gn->get_rect(); - r.size *= zoom; bool in_box = r.intersects(box_selecting_rect); if (in_box) { @@ -1215,7 +1210,6 @@ void GraphEdit::gui_input(const Ref<InputEvent> &p_ev) { if (gn) { Rect2 r = gn->get_rect(); - r.size *= zoom; if (r.has_point(mb->get_position())) { gn->set_selected(false); } |