Skip to content

After pasting, focus all pasted files/folders instead of just one #9299

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/Files.Uwp/ViewModels/ItemViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1987,6 +1987,7 @@ private async Task ProcessOperationQueue(CancellationToken cancellationToken, bo

bool anyEdits = false;
ListedItem lastItemAdded = null;
List<ListedItem> itemsAdded = new();
ListedItem nextOfLastItemRemoved = null;
var rand = Guid.NewGuid();

Expand All @@ -1997,7 +1998,7 @@ async Task HandleChangesOccurredAsync()
await ApplyFilesAndFoldersChangesAsync();
if (lastItemAdded != null)
{
await RequestSelectionAsync(new List<ListedItem>() { lastItemAdded });
await RequestSelectionAsync(itemsAdded);
lastItemAdded = null;
}
if (nextOfLastItemRemoved != null)
Expand Down Expand Up @@ -2026,6 +2027,7 @@ async Task HandleChangesOccurredAsync()
case FILE_ACTION_ADDED:
case FILE_ACTION_RENAMED_NEW_NAME:
lastItemAdded = await AddFileOrFolderAsync(operation.FileName);
itemsAdded.Add(lastItemAdded);
if (lastItemAdded != null)
{
anyEdits = true;
Expand Down