Fix sort en gen video w hardsub

This commit is contained in:
Nikolaj Olsson 2024-04-29 18:22:47 +02:00
parent 7b15d11cc1
commit a72ebd04d5

View File

@ -979,12 +979,18 @@ namespace Nikse.SubtitleEdit.Forms
if (_abort)
{
process.Kill();
return false;
}
var v = (int)_processedFrames;
SetProgress(v);
}
if (_abort)
{
return false;
}
if (process.ExitCode != 0)
{
_log.AppendLine("ffmpeg exit code: " + process.ExitCode);
@ -2113,6 +2119,7 @@ namespace Nikse.SubtitleEdit.Forms
try
{
Cursor = Cursors.WaitCursor;
Refresh();
Application.DoEvents();
for (var i = 0; i < listViewBatch.Columns.Count; i++)
{
@ -2121,6 +2128,7 @@ namespace Nikse.SubtitleEdit.Forms
foreach (var fileName in openFileDialog1.FileNames)
{
Application.DoEvents();
AddInputFile(fileName);
}
}
@ -2297,13 +2305,14 @@ namespace Nikse.SubtitleEdit.Forms
return;
}
try
{
var fileNames = (string[])e.Data.GetData(DataFormats.FileDrop);
labelPleaseWait.Visible = true;
TaskDelayHelper.RunDelayed(TimeSpan.FromMilliseconds(5), () =>
{
try
{
Cursor = Cursors.WaitCursor;
foreach (var fileName in fileNames)
{
if (FileUtil.IsDirectory(fileName))
@ -2312,15 +2321,17 @@ namespace Nikse.SubtitleEdit.Forms
}
else
{
Application.DoEvents();
AddInputFile(fileName);
}
}
});
}
finally
{
Cursor = Cursors.Default;
labelPleaseWait.Visible = false;
}
});
}
private void SearchFolder(string path)
@ -2418,6 +2429,11 @@ namespace Nikse.SubtitleEdit.Forms
return;
}
for (var i = 0; i < listViewBatch.Columns.Count; i++)
{
ListViewSorter.SetSortArrow(listViewBatch.Columns[i], SortOrder.None);
}
var lv = (ListView)sender;
if (!(lv.ListViewItemSorter is ListViewSorter sorter))
{
@ -2436,6 +2452,8 @@ namespace Nikse.SubtitleEdit.Forms
else
{
sorter.ColumnNumber = e.Column;
sorter.Descending = false;
sorter.IsDisplayFileSize = e.Column == ListViewBatchSubItemIndexColumnVideoSize;
}
lv.Sort();