summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2020-10-14 12:40:18 +0200
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2020-10-14 12:40:18 +0200
commit410b324740efa8640e1cb79c7c1a7801636798b3 (patch)
tree3d82296c1de3806913765ddd3907019c33949117
parentbc91e088e4503bbf1c5800282f2974011a4cc8e8 (diff)
EditorNode now copies all drag and dropped files.
The editor used to only copy drag-dropped files in the File System pane if the given file was a valid resource, or had a specific file format (ttf, otf). With this PR, all drag and dropped files are copied instead, no matter their extension.
-rw-r--r--editor/editor_node.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 73562e0695..a6321ce058 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -5122,7 +5122,6 @@ void EditorNode::_dropped_files(const Vector<String> &p_files, int p_screen) {
void EditorNode::_add_dropped_files_recursive(const Vector<String> &p_files, String to_path) {
DirAccessRef dir = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
- Vector<String> just_copy = String("ttf,otf").split(",");
for (int i = 0; i < p_files.size(); i++) {
String from = p_files[i];
@@ -5153,9 +5152,6 @@ void EditorNode::_add_dropped_files_recursive(const Vector<String> &p_files, Str
continue;
}
- if (!ResourceFormatImporter::get_singleton()->can_be_imported(from) && (just_copy.find(from.get_extension().to_lower()) == -1)) {
- continue;
- }
dir->copy(from, to);
}
}