diff --git a/Source/Editor/Content/GUI/ContentView.cs b/Source/Editor/Content/GUI/ContentView.cs index 7eb2e0950..6065ca9f8 100644 --- a/Source/Editor/Content/GUI/ContentView.cs +++ b/Source/Editor/Content/GUI/ContentView.cs @@ -692,10 +692,13 @@ namespace FlaxEditor.Content.GUI c = char.ToLowerInvariant(c); for (int i = 0; i < _items.Count; i++) { - var name = _items[i].ShortName; + var item = _items[i]; + var name = item.ShortName; if (!string.IsNullOrEmpty(name) && char.ToLowerInvariant(name[0]) == c) { - Select(_items[i]); + Select(item); + if (Parent is Panel panel) + panel.ScrollViewTo(item, true); break; } } diff --git a/Source/Editor/Windows/ContentWindow.cs b/Source/Editor/Windows/ContentWindow.cs index c2b56466d..207abb84f 100644 --- a/Source/Editor/Windows/ContentWindow.cs +++ b/Source/Editor/Windows/ContentWindow.cs @@ -611,19 +611,15 @@ namespace FlaxEditor.Windows /// The files paths to import. public void Paste(string[] files) { - List importFiles = new List(); + var importFiles = new List(); foreach (var sourcePath in files) { var item = Editor.ContentDatabase.Find(sourcePath); if (item != null) - { - string targetPath = Path.Combine(CurrentViewFolder.Path, item.FileName); - Editor.ContentDatabase.Copy(item, targetPath); - } + Editor.ContentDatabase.Copy(item, Path.Combine(CurrentViewFolder.Path, item.FileName)); else importFiles.Add(sourcePath); } - Editor.ContentImporting.Import(importFiles, CurrentViewFolder); }