mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 03:02:35 +01:00
Fix for ASSA line selector
This commit is contained in:
parent
d0e9193248
commit
70cf488f40
@ -109,6 +109,7 @@ namespace Nikse.SubtitleEdit.Forms.Assa
|
||||
this.listViewFixes.TabIndex = 1;
|
||||
this.listViewFixes.UseCompatibleStateImageBehavior = false;
|
||||
this.listViewFixes.View = System.Windows.Forms.View.Details;
|
||||
this.listViewFixes.ItemChecked += new System.Windows.Forms.ItemCheckedEventHandler(this.listViewFixes_ItemChecked);
|
||||
//
|
||||
// columnHeaderApply
|
||||
//
|
||||
|
@ -97,7 +97,9 @@ namespace Nikse.SubtitleEdit.Forms.Assa
|
||||
}
|
||||
|
||||
Indices = indices.ToArray();
|
||||
listViewFixes.ItemChecked -= listViewFixes_ItemChecked;
|
||||
listViewFixes.Items.AddRange(listViewItems.ToArray());
|
||||
listViewFixes.ItemChecked += listViewFixes_ItemChecked;
|
||||
listViewFixes.EndUpdate();
|
||||
groupBoxPreview.Text = string.Format(LanguageSettings.Current.ModifySelection.MatchingLinesX, listViewFixes.Items.Count);
|
||||
listViewFixes.AutoSizeLastColumn();
|
||||
@ -187,5 +189,18 @@ namespace Nikse.SubtitleEdit.Forms.Assa
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void listViewFixes_ItemChecked(object sender, ItemCheckedEventArgs e)
|
||||
{
|
||||
if (e.Item == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (int.TryParse(e.Item.Tag.ToString(), out var index))
|
||||
{
|
||||
Indices = Indices.ToList().Where(p => p != index).ToArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user