diff options
author | Max Hilbrunner <mhilbrunner@users.noreply.github.com> | 2019-05-17 19:51:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-17 19:51:18 +0200 |
commit | 580b0c651df86675145a696b1e961b224bf3ad8c (patch) | |
tree | 094288bdeb71c863dd0b17ed7f0609d452552404 /editor | |
parent | e5834a3bc8fabfe5f427e5684dcb25fa6e8e45ac (diff) | |
parent | c9b9ba26db700eb794793ffe5188edb8657548de (diff) |
Merge pull request #28920 from hmumm/dragging-directory-adds-it-to-script
Directories can now be dragged into the script editor
Diffstat (limited to 'editor')
-rw-r--r-- | editor/plugins/script_text_editor.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp index d40e67cc8c..eaba48fa05 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/editor/plugins/script_text_editor.cpp @@ -1266,7 +1266,8 @@ bool ScriptTextEditor::can_drop_data_fw(const Point2 &p_point, const Variant &p_ Dictionary d = p_data; if (d.has("type") && (String(d["type"]) == "resource" || String(d["type"]) == "files" || - String(d["type"]) == "nodes")) { + String(d["type"]) == "nodes" || + String(d["type"]) == "files_and_dirs")) { return true; } @@ -1328,7 +1329,7 @@ void ScriptTextEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data te->insert_text_at_cursor(res->get_path()); } - if (d.has("type") && String(d["type"]) == "files") { + if (d.has("type") && (String(d["type"]) == "files" || String(d["type"]) == "files_and_dirs")) { Array files = d["files"]; |