Fix for gen of transparent subs

This commit is contained in:
Nikolaj Olsson 2024-07-28 15:22:11 +02:00
parent bdf5c7a80d
commit f402c3c2dd
2 changed files with 27 additions and 10 deletions

View File

@ -140,19 +140,19 @@
// deleteToolStripMenuItem
//
this.deleteToolStripMenuItem.Name = "deleteToolStripMenuItem";
this.deleteToolStripMenuItem.Size = new System.Drawing.Size(171, 22);
this.deleteToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.deleteToolStripMenuItem.Text = "Delete";
this.deleteToolStripMenuItem.Click += new System.EventHandler(this.deleteToolStripMenuItem_Click);
//
// toolStripSeparator2
//
this.toolStripSeparator2.Name = "toolStripSeparator2";
this.toolStripSeparator2.Size = new System.Drawing.Size(168, 6);
this.toolStripSeparator2.Size = new System.Drawing.Size(177, 6);
//
// addFilesToolStripMenuItem
//
this.addFilesToolStripMenuItem.Name = "addFilesToolStripMenuItem";
this.addFilesToolStripMenuItem.Size = new System.Drawing.Size(171, 22);
this.addFilesToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.addFilesToolStripMenuItem.Text = "Add subtitle files...";
this.addFilesToolStripMenuItem.Click += new System.EventHandler(this.addFilesToolStripMenuItem_Click);
//
@ -168,30 +168,31 @@
this.deleteToolStripMenuItem,
this.clearToolStripMenuItem});
this.contextMenuStripBatch.Name = "contextMenuStripBatch";
this.contextMenuStripBatch.Size = new System.Drawing.Size(172, 126);
this.contextMenuStripBatch.Size = new System.Drawing.Size(181, 148);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(168, 6);
this.toolStripSeparator1.Size = new System.Drawing.Size(177, 6);
//
// pickVideoFileToolStripMenuItem
//
this.pickVideoFileToolStripMenuItem.Name = "pickVideoFileToolStripMenuItem";
this.pickVideoFileToolStripMenuItem.Size = new System.Drawing.Size(171, 22);
this.pickVideoFileToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.pickVideoFileToolStripMenuItem.Text = "Pick video file...";
this.pickVideoFileToolStripMenuItem.Click += new System.EventHandler(this.pickVideoFileToolStripMenuItem_Click);
//
// removeVideoFileToolStripMenuItem
//
this.removeVideoFileToolStripMenuItem.Name = "removeVideoFileToolStripMenuItem";
this.removeVideoFileToolStripMenuItem.Size = new System.Drawing.Size(171, 22);
this.removeVideoFileToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.removeVideoFileToolStripMenuItem.Text = "Remove video file";
this.removeVideoFileToolStripMenuItem.Click += new System.EventHandler(this.removeVideoFileToolStripMenuItem_Click);
//
// clearToolStripMenuItem
//
this.clearToolStripMenuItem.Name = "clearToolStripMenuItem";
this.clearToolStripMenuItem.Size = new System.Drawing.Size(171, 22);
this.clearToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.clearToolStripMenuItem.Text = "Clear";
this.clearToolStripMenuItem.Click += new System.EventHandler(this.clearToolStripMenuItem_Click);
//

View File

@ -303,7 +303,11 @@ namespace Nikse.SubtitleEdit.Forms
private void buttonCancel_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.Cancel;
_abort = true;
if (buttonGenerate.Enabled)
{
DialogResult = DialogResult.Cancel;
}
}
private void buttonGenerate_Click(object sender, EventArgs e)
@ -353,7 +357,7 @@ namespace Nikse.SubtitleEdit.Forms
for (var i = 0; i < listViewBatch.Items.Count; i++)
{
listViewBatch.Items[i].SubItems[1].Text = string.Empty;
listViewBatch.Items[i].SubItems[ListViewBatchSubItemIndexColumnStatus].Text = string.Empty;
}
listViewBatch.SelectedIndices.Clear();
@ -1704,6 +1708,18 @@ namespace Nikse.SubtitleEdit.Forms
}
}
}
private void removeVideoFileToolStripMenuItem_Click(object sender, EventArgs e)
{
foreach (int i in listViewBatch.SelectedIndices)
{
listViewBatch.Items[i].SubItems[ListViewBatchSubItemIndexColumnVideoFileName].Text = string.Empty;
listViewBatch.Items[i].SubItems[ListViewBatchSubItemIndexColumnResolution].Text = string.Empty;
_batchItems[i].VideoFileName = string.Empty;
_batchItems[i].Width = 0;
_batchItems[i].Height = 0;
}
}
}
}