mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-01-11 19:44:55 +00:00
fix: TableBuilder no longer draws redundant separators
This commit is contained in:
@@ -182,12 +182,20 @@ namespace ICD.Common.Utils
|
||||
AppendRow(sb, m_Columns, columnWidths);
|
||||
AppendSeparator(sb, columnWidths);
|
||||
|
||||
foreach (string[] row in m_Rows)
|
||||
string[] previousRow = null;
|
||||
|
||||
for (int index = 0; index < m_Rows.Count; index++)
|
||||
{
|
||||
if (row == null)
|
||||
AppendSeparator(sb, columnWidths);
|
||||
else
|
||||
string[] row = m_Rows[index];
|
||||
|
||||
// Data row
|
||||
if (row != null)
|
||||
AppendRow(sb, row, columnWidths);
|
||||
// Separator
|
||||
else if (previousRow != null && index < m_Rows.Count - 1)
|
||||
AppendSeparator(sb, columnWidths);
|
||||
|
||||
previousRow = row;
|
||||
}
|
||||
|
||||
AppendBottomSeparator(sb, columnWidths);
|
||||
|
||||
Reference in New Issue
Block a user