Add remove entry via del key in batch waveforms - thx Jamakmake :)

This commit is contained in:
Nikolaj Olsson 2019-10-07 08:39:21 +02:00
parent e451250c76
commit b7b8b1dd90
2 changed files with 10 additions and 2 deletions

View File

@ -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
//

View File

@ -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();
}
}
}
}
}