summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-04-22 11:54:27 +0200
committerGitHub <noreply@github.com>2019-04-22 11:54:27 +0200
commit429fc5b62ce1a2069aaf7bf966d3557475c8b474 (patch)
treef2639d5b59456eee230040590047b66f7ce62892 /modules
parentb4860ce3ac81ae5df1661eefb22a1adf01676957 (diff)
parenta68b733e17bb094d719b292e4356982650bfb3e1 (diff)
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
Diffstat (limited to 'modules')
-rw-r--r--modules/visual_script/visual_script_editor.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp
index 6e7e566206..efd471eed1 100644
--- a/modules/visual_script/visual_script_editor.cpp
+++ b/modules/visual_script/visual_script_editor.cpp
@@ -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);
}