diff --git a/PROMS/Volian.Controls.Library/VlnFlexGrid.cs b/PROMS/Volian.Controls.Library/VlnFlexGrid.cs index 1dd8d912..526e98cf 100644 --- a/PROMS/Volian.Controls.Library/VlnFlexGrid.cs +++ b/PROMS/Volian.Controls.Library/VlnFlexGrid.cs @@ -3777,6 +3777,19 @@ namespace Volian.Controls.Library } else // parsed text contains all dashes { + // take a peek at the start of the next piece of table text to parse + // if it starts with a space, return, newline, or EndOfFile char, + // then flag to merge the columns up to + // this point with the same columns in the next row + if (idx < txtbuff.Length - 1 && " \r\n\x02".IndexOf(txtbuff[idx + 1]) > 0) + { + int nextCol = (curCol + 1 > this.Cols.Count) ? curCol : curCol + 1; + if (!tci[curRow, nextCol].ColEnd) + tci[curRow, nextCol].MergeRowBellow = true; + //for (int c = nextCol; c >= 0; c--) + // if (!tci[curRow, c].ColEnd) + // tci[curRow, c].MergeRowBellow = true; + } tci[curRow, curCol].ColEnd = true; incRow = true; } @@ -3825,7 +3838,7 @@ namespace Volian.Controls.Library else if (tstr.Length > 0) // parsed text is all dash characters { incRow = true; - if (curRow > 0) // merge the column in the previous row with this one + if (curRow > 0 && curCol > 0) // merge the column in the previous row with this one tci[curRow - 1, curCol].MergeRowBellow = false; } // if were are that the end of the 16-bit text line, but not in the last column,