From af8d85a15e2a78e103d9be9de083b06c51b8f2d3 Mon Sep 17 00:00:00 2001 From: Haoyu Qiu Date: Sat, 9 Apr 2022 09:11:56 +0800 Subject: [PATCH] Fix crash when dragging from Input Map to VisualScript editor --- editor/project_settings_editor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp index f39c4f94c64..7e52b9bbd81 100644 --- a/editor/project_settings_editor.cpp +++ b/editor/project_settings_editor.cpp @@ -1105,7 +1105,7 @@ Variant ProjectSettingsEditor::get_drag_data_fw(const Point2 &p_point, Control * set_drag_preview(vb); Dictionary drag_data; - drag_data["type"] = "nodes"; + drag_data["type"] = "input_map"; input_editor->set_drop_mode_flags(Tree::DROP_MODE_INBETWEEN); @@ -1114,7 +1114,7 @@ Variant ProjectSettingsEditor::get_drag_data_fw(const Point2 &p_point, Control * bool ProjectSettingsEditor::can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const { Dictionary d = p_data; - if (!d.has("type") || d["type"] != "nodes") { + if (!d.has("type") || d["type"] != "input_map") { return false; }