Merge pull request #29333 from hbina/fix_double_click_when_no_edited_func

fixed an issue with double clicking available node in VisualScriptEditor
This commit is contained in:
Rémi Verschelde 2019-07-01 16:33:04 +02:00 committed by GitHub
commit 08200cb9f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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()) {