C2018-031 added CheckAndFixBorderArrays() that will correct the table border arrays only if needed, prior to editing a table.

This commit is contained in:
2018-09-27 13:19:34 +00:00
parent 0fc87fdbaa
commit d0ce429883
2 changed files with 28 additions and 1 deletions

View File

@@ -1356,6 +1356,7 @@ namespace Volian.Controls.Library
Rectangle bounds = e.Bounds;
int row = e.Row;
int col = e.Col;
MyBorders.CheckAndFixBorderArraySize(this.Rows.Count, this.Cols.Count, GridLinePattern.Single); // C2018-031 check the cell border arrays
CellRange cr = GetMergedRange(row, col);
GridLinePattern topSide = MyBorders.HorizontalLines[cr.r1,cr.c1];
GridLinePattern rightOfTopSide = cr.c2 == Cols.Count - 1 ? GridLinePattern.None : MyBorders.HorizontalLines[cr.r1, cr.c2 + 1];