summaryrefslogtreecommitdiff
path: root/tools/editor/filesystem_dock.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/editor/filesystem_dock.cpp')
-rw-r--r--tools/editor/filesystem_dock.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/editor/filesystem_dock.cpp b/tools/editor/filesystem_dock.cpp
index 3be122cc7d..378edd6667 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"));
}