diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-07-15 08:02:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-15 08:02:14 +0200 |
commit | 71cd4fa40dd339c35ce3372a18709adc00b34305 (patch) | |
tree | c0f2d497ef7a932f8ac793fe814db2860d22d4dd | |
parent | 0471e4d578d6675a4c20d8b6a328a456cfd84a4a (diff) | |
parent | 381faf83c33c3f2c1e42e12b511d1b3ea9e50582 (diff) |
Merge pull request #30510 from sparkart/master
Fix GraphNode immediately losing focus
-rw-r--r-- | scene/gui/graph_node.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/gui/graph_node.cpp b/scene/gui/graph_node.cpp index 6463ee5ad5..222c75b21d 100644 --- a/scene/gui/graph_node.cpp +++ b/scene/gui/graph_node.cpp @@ -599,6 +599,8 @@ void GraphNode::_gui_input(const Ref<InputEvent> &p_ev) { Vector2 mpos = Vector2(mb->get_position().x, mb->get_position().y); if (close_rect.size != Size2() && close_rect.has_point(mpos)) { + //send focus to parent + get_parent_control()->grab_focus(); emit_signal("close_request"); accept_event(); return; @@ -615,9 +617,7 @@ void GraphNode::_gui_input(const Ref<InputEvent> &p_ev) { return; } - //send focus to parent emit_signal("raise_request"); - get_parent_control()->grab_focus(); } if (!mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT) { |