public void AddIssues(ProjectIssue[] issues) { if (m_Desc.groupByDescriptor) { var descriptors = issues.Select(i => i.descriptor).Distinct().ToArray(); var itemGroups = descriptors.Select(d => new IssueTableItem(m_NextId++, 0, d)).ToArray(); m_TreeViewItemGroups.AddRange(itemGroups); } var itemsList = new List <IssueTableItem>(issues.Length); if (m_TreeViewItemIssues != null) { itemsList.AddRange(m_TreeViewItemIssues); } foreach (var issue in issues) { var depth = issue.depth; if (m_Desc.groupByDescriptor) { depth++; } var item = new IssueTableItem(m_NextId++, depth, issue.name, issue.descriptor, issue); itemsList.Add(item); } m_TreeViewItemIssues = itemsList.ToArray(); }
public ItemTree(IssueTableItem i, IssueLayout layout) { m_Item = i; m_Children = new List <ItemTree>(); m_Layout = layout; }