diff options
| author | Juan Linietsky | 2016-08-02 19:11:47 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2016-08-02 19:11:47 -0300 |
| commit | 3d1d190dcd2993f87d5804de8a60e8bf5fc2cf49 (patch) | |
| tree | aa2c814b744ab970ae79931b419908ff7ebc850e /tools/editor/filesystem_dock.cpp | |
| parent | ad313097ebcb2a0c02c956fdf74a6610c3f7c9a8 (diff) | |
| parent | cea949180688add09eb9e69f5e405f361dc96d40 (diff) | |
| download | godot-3d1d190dcd2993f87d5804de8a60e8bf5fc2cf49.tar.gz godot-3d1d190dcd2993f87d5804de8a60e8bf5fc2cf49.tar.zst godot-3d1d190dcd2993f87d5804de8a60e8bf5fc2cf49.zip | |
Merge branch 'master' of https://github.com/godotengine/godot
Diffstat (limited to 'tools/editor/filesystem_dock.cpp')
| -rw-r--r-- | tools/editor/filesystem_dock.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/editor/filesystem_dock.cpp b/tools/editor/filesystem_dock.cpp index 3be122cc7..378edd666 100644 --- a/tools/editor/filesystem_dock.cpp +++ b/tools/editor/filesystem_dock.cpp @@ -950,14 +950,20 @@ void FileSystemDock::_file_option(int p_option) { } break; case FILE_INSTANCE: { + Vector<String> paths; + for (int i = 0; i<files->get_item_count(); i++) { if (!files->is_selected(i)) continue; String path =files->get_item_metadata(i); if (EditorFileSystem::get_singleton()->get_file_type(path)=="PackedScene") { - emit_signal("instance",path); + paths.push_back(path); } } + + if (!paths.empty()) { + emit_signal("instance", paths); + } } break; case FILE_DEPENDENCIES: { @@ -1596,7 +1602,7 @@ void FileSystemDock::_bind_methods() { ObjectTypeDB::bind_method(_MD("_preview_invalidated"),&FileSystemDock::_preview_invalidated); - ADD_SIGNAL(MethodInfo("instance")); + ADD_SIGNAL(MethodInfo("instance", PropertyInfo(Variant::STRING_ARRAY, "files"))); ADD_SIGNAL(MethodInfo("open")); } |
