more list view update after load

This commit is contained in:
niksedk 2022-03-21 21:23:24 +01:00
parent b827aa667f
commit fcb5e37744

View File

@ -3706,6 +3706,8 @@ namespace Nikse.SubtitleEdit.Forms
if (format != null)
{
SubtitleListview1.SelectedIndexChanged -= SubtitleListview1_SelectedIndexChanged;
RemoveOriginal(true, false);
//if (!format.HasStyleSupport) -- remove -- see https://www.nikse.dk/Home/Details/637741307830000000
//{
@ -3801,10 +3803,7 @@ namespace Nikse.SubtitleEdit.Forms
_subtitleListViewIndex = -1;
SubtitleListview1.Fill(newSubtitle, _subtitleOriginal);
_subtitle = newSubtitle;
if (SubtitleListview1.Items.Count > 0)
{
SubtitleListview1.SelectIndexAndEnsureVisible(0);
}
_findHelper = null;
_spellCheckForm = null;
@ -3967,6 +3966,14 @@ namespace Nikse.SubtitleEdit.Forms
}
}
}
SubtitleListview1.SelectedIndexChanged += SubtitleListview1_SelectedIndexChanged;
_subtitleListViewIndex = -1;
if (SubtitleListview1.Items.Count > 0)
{
SubtitleListview1.SelectIndexAndEnsureVisible(0);
}
}
else
{