From 1e36c4f811d52996c970236039a94060e1a81e8d Mon Sep 17 00:00:00 2001 From: sr55 Date: Fri, 19 Apr 2019 22:43:30 +0100 Subject: WinGui: Make the Queue Delete button more reliable. Doesn't need a double click now for first use. --- win/CS/HandBrakeWPF/Views/QueueView.xaml.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'win/CS/HandBrakeWPF/Views/QueueView.xaml.cs') diff --git a/win/CS/HandBrakeWPF/Views/QueueView.xaml.cs b/win/CS/HandBrakeWPF/Views/QueueView.xaml.cs index fbc94a7c6..aed7faf36 100644 --- a/win/CS/HandBrakeWPF/Views/QueueView.xaml.cs +++ b/win/CS/HandBrakeWPF/Views/QueueView.xaml.cs @@ -168,6 +168,15 @@ namespace HandBrakeWPF.Views { ((QueueViewModel)this.DataContext).EditJob(this.mouseActiveQueueTask); } - + + private void QueueDeleteJob_OnClick(object sender, RoutedEventArgs e) + { + Button button = sender as Button; + QueueTask task = button?.DataContext as QueueTask; + if (task != null) + { + ((QueueViewModel)this.DataContext).RemoveJob(task); + } + } } } -- cgit v1.2.3