Skip to content

armgit / godot

Public Imported from GitHub
0

Godot Engine – Multi-platform 2D and 3D game engine

Fix dropping files on floating docks not adding files to project

Prawnya096da96e9274
diff --git a/editor/editor_node.h b/editor/editor_node.h
index f943b00d4b9..0c5fb7e4ba2 100644
--- a/editor/editor_node.h
+++ b/editor/editor_node.h
@@ -637,7 +637,6 @@ private:
void _update_recent_scenes();
void _open_recent_scene(int p_idx);
- void _dropped_files(const Vector<String> &p_files);
void _add_dropped_files_recursive(const Vector<String> &p_files, String to_path);
void _update_vsync_mode();
@@ -759,6 +758,7 @@ protected:
public:
// Public for use as signal callback.
void _on_plugin_ready(Object *p_script, const String &p_activate_name);
+ void _dropped_files(const Vector<String> &p_files);
void init_plugins();
diff --git a/editor/gui/window_wrapper.cpp b/editor/gui/window_wrapper.cpp
index 1857f206bca..9276ad935eb 100644
--- a/editor/gui/window_wrapper.cpp
+++ b/editor/gui/window_wrapper.cpp
@@ -341,6 +341,7 @@ WindowWrapper::WindowWrapper() {
window->connect("close_requested", callable_mp(this, &WindowWrapper::_window_close_request));
window->connect("size_changed", callable_mp(this, &WindowWrapper::_window_size_changed));
+ window->connect("files_dropped", callable_mp(EditorNode::get_singleton(), &EditorNode::_dropped_files));
window_background = memnew(Panel);
window_background->set_anchors_and_offsets_preset(PRESET_FULL_RECT);