[Add Item to list view] - Minor Refactor

This commit is contained in:
ivandrofly 2015-10-11 22:00:32 +01:00
parent 0d63370c10
commit 9b593a39bf

View File

@ -58,12 +58,8 @@ namespace Nikse.SubtitleEdit.Forms
private void AddToListView(Paragraph p, string lineNumbers, string newText)
{
var item = new ListViewItem(string.Empty) { Tag = p, Checked = true };
var subItem = new ListViewItem.ListViewSubItem(item, lineNumbers.TrimEnd(','));
item.SubItems.Add(subItem);
subItem = new ListViewItem.ListViewSubItem(item, newText.Replace(Environment.NewLine, Configuration.Settings.General.ListViewLineSeparatorString));
item.SubItems.Add(subItem);
item.SubItems.Add(lineNumbers.TrimEnd(','));
item.SubItems.Add(newText.Replace(Environment.NewLine, Configuration.Settings.General.ListViewLineSeparatorString));
listViewFixes.Items.Add(item);
}