Merge pull request #28162 from Jummit/vs-new-nodes-at-cursor

Position nodes added from the generic search to the position the cursor was when opening the search
This commit is contained in:
Rémi Verschelde 2019-04-22 11:54:27 +02:00 committed by GitHub
commit 429fc5b62c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -37,6 +37,7 @@
#include "core/variant.h"
#include "editor/editor_node.h"
#include "editor/editor_resource_preview.h"
#include "scene/main/viewport.h"
#include "visual_script_expression.h"
#include "visual_script_flow_control.h"
#include "visual_script_func_nodes.h"
@ -1330,6 +1331,7 @@ void VisualScriptEditor::_input(const Ref<InputEvent> &p_event) {
}
void VisualScriptEditor::_generic_search() {
port_action_pos = graph->get_viewport()->get_mouse_position() - graph->get_global_position();
new_connect_node_select->select_from_visual_script(String(""), false);
}