diff options
author | K. S. Ernest (iFire) Lee <ernest.lee@chibifire.com> | 2019-05-01 08:27:22 -0700 |
---|---|---|
committer | K. S. Ernest (iFire) Lee <ernest.lee@chibifire.com> | 2019-05-01 08:27:22 -0700 |
commit | 432460a355370ac039112d8009c311cec204eefe (patch) | |
tree | e5794d2c236c1dd73a90e57a2e07e5c942eef26d /modules/visual_script | |
parent | 4e6420b5a8a011c7912765dc988d5f8f9bf67a63 (diff) |
VS: Give the generic search the current base type.
Diffstat (limited to 'modules/visual_script')
-rw-r--r-- | modules/visual_script/visual_script_editor.cpp | 7 | ||||
-rw-r--r-- | modules/visual_script/visual_script_editor.h | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp index 28c9a11cb8..4f6828bf1c 100644 --- a/modules/visual_script/visual_script_editor.cpp +++ b/modules/visual_script/visual_script_editor.cpp @@ -1330,9 +1330,9 @@ void VisualScriptEditor::_input(const Ref<InputEvent> &p_event) { } } -void VisualScriptEditor::_generic_search() { +void VisualScriptEditor::_generic_search(String p_base_type) { port_action_pos = graph->get_viewport()->get_mouse_position() - graph->get_global_position(); - new_connect_node_select->select_from_visual_script(String(""), false); + new_connect_node_select->select_from_visual_script(p_base_type, false); } void VisualScriptEditor::_members_gui_input(const Ref<InputEvent> &p_event) { @@ -1787,7 +1787,6 @@ void VisualScriptEditor::drop_data_fw(const Point2 &p_point, const Variant &p_da call->set_base_path(sn->get_path_to(node)); call->set_base_type(node->get_class()); n = call; - method_select->select_from_instance(node); selecting_method_id = base_id; } @@ -3156,7 +3155,7 @@ void VisualScriptEditor::_menu_option(int p_what) { } break; case EDIT_FIND_NODE_TYPE: { - _generic_search(); + _generic_search(script->get_instance_base_type()); } break; case EDIT_COPY_NODES: case EDIT_CUT_NODES: { diff --git a/modules/visual_script/visual_script_editor.h b/modules/visual_script/visual_script_editor.h index 9387a09c78..3d3a49f672 100644 --- a/modules/visual_script/visual_script_editor.h +++ b/modules/visual_script/visual_script_editor.h @@ -212,7 +212,7 @@ class VisualScriptEditor : public ScriptEditorBase { void _input(const Ref<InputEvent> &p_event); - void _generic_search(); + void _generic_search(String p_base_type = ""); void _members_gui_input(const Ref<InputEvent> &p_event); void _on_nodes_delete(); |