diff options
-rw-r--r-- | win/CS/HandBrakeWPF/Services/Queue/QueueService.cs | 5 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/win/CS/HandBrakeWPF/Services/Queue/QueueService.cs b/win/CS/HandBrakeWPF/Services/Queue/QueueService.cs index 5599953c1..27b66379e 100644 --- a/win/CS/HandBrakeWPF/Services/Queue/QueueService.cs +++ b/win/CS/HandBrakeWPF/Services/Queue/QueueService.cs @@ -222,11 +222,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); } @@ -241,6 +243,7 @@ namespace HandBrakeWPF.Services.Queue { this.queue.Remove(item); } + this.InvokeQueueChanged(EventArgs.Empty); }); } diff --git a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs index 1a0c67b61..6d9ccdfec 100644 --- a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs @@ -305,7 +305,7 @@ namespace HandBrakeWPF.ViewModels public void Clear()
{
MessageBoxResult result = this.errorService.ShowMessageBox(
- Resources.QueueViewModel_ClearQueueConfrimation, Resources.Confirm, MessageBoxButton.YesNo, MessageBoxImage.Warning);
+ Resources.QueueViewModel_ClearQueueConfrimation, Resources.Confirm, MessageBoxButton.YesNo, MessageBoxImage.Question);
if (result == MessageBoxResult.Yes)
{
this.queueProcessor.Clear();
@@ -399,7 +399,7 @@ namespace HandBrakeWPF.ViewModels return;
}
- List<QueueTask> tasksToRemove = this.SelectedItems.ToList();
+ List<QueueTask> tasksToRemove = this.SelectedItems.Where(i => i.Status != QueueItemStatus.InProgress).ToList();
foreach (QueueTask job in tasksToRemove)
{
this.RemoveJob(job);
|