Просмотр исходного кода

Instance only selected scenes in FS dock, closes #5795

Juan Linietsky 9 лет назад
Родитель
Сommit
4abc945466
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      tools/editor/filesystem_dock.cpp

+ 2 - 1
tools/editor/filesystem_dock.cpp

@@ -951,7 +951,8 @@ void FileSystemDock::_file_option(int p_option) {
 		case FILE_INSTANCE: {
 		case FILE_INSTANCE: {
 
 
 			for (int i = 0; i<files->get_item_count(); i++) {
 			for (int i = 0; i<files->get_item_count(); i++) {
-
+				if (!files->is_selected(i))
+					continue;
 				String path =files->get_item_metadata(i);
 				String path =files->get_item_metadata(i);
 				if (EditorFileSystem::get_singleton()->get_file_type(path)=="PackedScene") {
 				if (EditorFileSystem::get_singleton()->get_file_type(path)=="PackedScene") {
 					emit_signal("instance",path);
 					emit_signal("instance",path);