From e0e0d8b22954c78f3e154a1a0fa89b389bfe0164 Mon Sep 17 00:00:00 2001 From: hbina085 Date: Thu, 30 May 2019 19:10:33 -0400 Subject: [PATCH] fixed an issue where there is no edited function but user double clicks on an available functions --- modules/visual_script/visual_script_editor.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp index aad6e95845c..51e65de5f23 100644 --- a/modules/visual_script/visual_script_editor.cpp +++ b/modules/visual_script/visual_script_editor.cpp @@ -1099,6 +1099,9 @@ void VisualScriptEditor::_expression_text_changed(const String &p_text, int p_id void VisualScriptEditor::_available_node_doubleclicked() { + if (edited_func == String()) + return; + TreeItem *item = nodes->get_selected(); if (!item) @@ -1107,7 +1110,6 @@ void VisualScriptEditor::_available_node_doubleclicked() { String which = item->get_metadata(0); if (which == String()) return; - Vector2 ofs = graph->get_scroll_ofs() + graph->get_size() * 0.5; if (graph->is_using_snap()) {