Fix keeping selected index after change of columns in BDSuupEdit - thx Jack1789 :)

Related to #7644
This commit is contained in:
niksedk 2023-11-20 07:04:29 +01:00
parent 5731e458ae
commit 73f36fd41a

View File

@ -2662,6 +2662,12 @@ $DROP=[DROPVALUE]" + Environment.NewLine + Environment.NewLine +
private void UpdateListViewColumns()
{
var oldIdx = 0;
if (subtitleListView1.SelectedItems.Count > 0)
{
oldIdx = subtitleListView1.SelectedItems[0].Index;
}
var index = 0;
subtitleListView1.BeginUpdate();
subtitleListView1.Items.Clear();
@ -2727,6 +2733,8 @@ $DROP=[DROPVALUE]" + Environment.NewLine + Environment.NewLine +
FillListView(_subtitle);
subtitleListView1.EndUpdate();
SelectIndexAndEnsureVisible(oldIdx);
subtitleListView1.AutoSizeLastColumn();
}
private void openVideoToolStripMenuItem_Click(object sender, EventArgs e)