From cc51b045da4bf40722d347c6306b2764a1c9d813 Mon Sep 17 00:00:00 2001 From: Anilforextra Date: Thu, 23 Sep 2021 20:43:43 +0545 Subject: Construct values only when necessary. --- scene/gui/graph_node.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scene/gui/graph_node.cpp') diff --git a/scene/gui/graph_node.cpp b/scene/gui/graph_node.cpp index 08c8c60d7a..cbdf2a498a 100644 --- a/scene/gui/graph_node.cpp +++ b/scene/gui/graph_node.cpp @@ -871,7 +871,7 @@ void GraphNode::gui_input(const Ref &p_ev) { ERR_FAIL_COND_MSG(get_parent_control() == nullptr, "GraphNode must be the child of a GraphEdit node."); if (mb->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_LEFT) { - Vector2 mpos = Vector2(mb->get_position().x, mb->get_position().y); + Vector2 mpos = mb->get_position(); if (close_rect.size != Size2() && close_rect.has_point(mpos)) { //send focus to parent get_parent_control()->grab_focus(); -- cgit v1.2.3