From 94c85beb56ef14be843f1704122e2086bf8d6ef9 Mon Sep 17 00:00:00 2001 From: Chris Cranford Date: Tue, 2 Jan 2024 20:49:39 -0500 Subject: [PATCH] Add Goto Node accelerator --- src/editor/main_view.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/editor/main_view.cpp b/src/editor/main_view.cpp index 13f1c2ae..e1717a01 100644 --- a/src/editor/main_view.cpp +++ b/src/editor/main_view.cpp @@ -45,7 +45,6 @@ #include #include #include -#include #include #include #include @@ -128,7 +127,7 @@ void OrchestratorMainView::_notification(int p_what) _goto_menu->set_v_size_flags(SIZE_SHRINK_BEGIN); _goto_menu->set_text("Goto"); _goto_menu->get_popup()->clear(); - _goto_menu->get_popup()->add_item("Goto Node", AccelMenuIds::GOTO_NODE); + _goto_menu->get_popup()->add_item("Goto Node", AccelMenuIds::GOTO_NODE, SKEY(KEY_MASK_CTRL, KEY_L)); _goto_menu->get_popup()->connect("id_pressed", callable_mp(this, &OrchestratorMainView::_on_menu_option)); _goto_menu->get_popup()->connect("about_to_popup", callable_mp(this, &OrchestratorMainView::_on_prepare_goto_menu)); left_menu_container->add_child(_goto_menu); @@ -266,6 +265,7 @@ void OrchestratorMainView::_notification(int p_what) LineEdit *node_number = memnew(LineEdit); node_number->set_select_all_on_focus(true); + _goto_dialog->register_text_enter(node_number); container->add_child(node_number); _goto_dialog->connect("visibility_changed", callable_mp(this, &OrchestratorMainView::_on_goto_node_visibility_changed).bind(node_number));