diff --git a/src/Forms/AddWaveformBatch.Designer.cs b/src/Forms/AddWaveformBatch.Designer.cs index 467b68574..e15741e33 100644 --- a/src/Forms/AddWaveformBatch.Designer.cs +++ b/src/Forms/AddWaveformBatch.Designer.cs @@ -136,6 +136,7 @@ this.listViewInputFiles.View = System.Windows.Forms.View.Details; this.listViewInputFiles.DragDrop += new System.Windows.Forms.DragEventHandler(this.listViewInputFiles_DragDrop); this.listViewInputFiles.DragEnter += new System.Windows.Forms.DragEventHandler(this.listViewInputFiles_DragEnter); + this.listViewInputFiles.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ListViewInputFiles_KeyDown); // // columnHeaderFName // diff --git a/src/Forms/AddWaveformBatch.cs b/src/Forms/AddWaveformBatch.cs index 669a813a2..5d3bde45f 100644 --- a/src/Forms/AddWaveformBatch.cs +++ b/src/Forms/AddWaveformBatch.cs @@ -54,7 +54,7 @@ namespace Nikse.SubtitleEdit.Forms private void RemoveSelectedFiles() { - if (_converting) + if (_converting || listViewInputFiles.SelectedIndices.Count == 0) { return; } @@ -410,5 +410,12 @@ namespace Nikse.SubtitleEdit.Forms } } + private void ListViewInputFiles_KeyDown(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Delete) + { + RemoveSelectedFiles(); + } + } } -} +} \ No newline at end of file