diff options
author | sr55 <[email protected]> | 2019-04-19 22:43:30 +0100 |
---|---|---|
committer | sr55 <[email protected]> | 2019-04-19 22:43:30 +0100 |
commit | 1e36c4f811d52996c970236039a94060e1a81e8d (patch) | |
tree | f5e82b39b7675d6cdc5758f7016841746bccc79e /win/CS/HandBrakeWPF/Views/QueueView.xaml.cs | |
parent | c2448cadbf0865578131c1f9518610e4f7a1d9dc (diff) |
WinGui: Make the Queue Delete button more reliable. Doesn't need a double click now for first use.
Diffstat (limited to 'win/CS/HandBrakeWPF/Views/QueueView.xaml.cs')
-rw-r--r-- | win/CS/HandBrakeWPF/Views/QueueView.xaml.cs | 11 |
1 files changed, 10 insertions, 1 deletions
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);
+ }
+ }
}
}
|