summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Services
diff options
context:
space:
mode:
authorsr55 <[email protected]>2020-01-18 20:28:15 +0000
committersr55 <[email protected]>2020-01-18 20:29:34 +0000
commit97424db9a6b116054ec31f4a6f1aee8a95e090da (patch)
tree38555ef780c3e5f9a91b5ae8d4a43e04dc3f411e /win/CS/HandBrakeWPF/Services
parent2a64670a88521b33fcad02b8ab5752a7d0c60e0c (diff)
WinGui: Clear queue options should not clear in-progress jobs. Fixes #2587
Diffstat (limited to 'win/CS/HandBrakeWPF/Services')
-rw-r--r--win/CS/HandBrakeWPF/Services/Queue/QueueService.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/win/CS/HandBrakeWPF/Services/Queue/QueueService.cs b/win/CS/HandBrakeWPF/Services/Queue/QueueService.cs
index 477aacba3..c231e65ec 100644
--- a/win/CS/HandBrakeWPF/Services/Queue/QueueService.cs
+++ b/win/CS/HandBrakeWPF/Services/Queue/QueueService.cs
@@ -223,11 +223,13 @@ namespace HandBrakeWPF.Services.Queue
public void Clear()
{
- List<QueueTask> deleteList = this.queue.ToList();
+ List<QueueTask> deleteList = this.queue.Where(i => i.Status != QueueItemStatus.InProgress).ToList();
+
foreach (QueueTask item in deleteList)
{
this.queue.Remove(item);
}
+
this.InvokeQueueChanged(EventArgs.Empty);
}
@@ -242,6 +244,7 @@ namespace HandBrakeWPF.Services.Queue
{
this.queue.Remove(item);
}
+
this.InvokeQueueChanged(EventArgs.Empty);
});
}