From f2247946e0200415896bcb7a121c8fc0c26f600f Mon Sep 17 00:00:00 2001 From: John Date: Fri, 8 Sep 2017 14:19:50 +0000 Subject: [PATCH] B2017-197 a Select method was being called in the SplitSelectionRow method all the time. We only need to call the Select method when are processing rows that do not contain any merged rows. --- PROMS/Volian.Controls.Library/VlnFlexGrid.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/PROMS/Volian.Controls.Library/VlnFlexGrid.cs b/PROMS/Volian.Controls.Library/VlnFlexGrid.cs index a50aaecc..b9206ed8 100644 --- a/PROMS/Volian.Controls.Library/VlnFlexGrid.cs +++ b/PROMS/Volian.Controls.Library/VlnFlexGrid.cs @@ -885,7 +885,7 @@ namespace Volian.Controls.Library int profileDepth = ProfileTimer.Push(">>>> VlnFlexGrid.LoadGrid"); _MyItemInfo = itemInfo; string str = itemInfo.MyContent.MyGrid.Data; - VE_Font vefont = _MyItemInfo.GetItemFont(); + VE_Font vefont = _MyItemInfo.GetItemFont(); // the following code is used to be sure that the font used for symbols is the correct font // based on whether the font for non-symbol text is fixed or proportional. Each steprtb has @@ -2678,9 +2678,12 @@ namespace Volian.Controls.Library Select(r, cr.c1, r, cr.c2); InsertRowAfter(); } + // B2017-197 move the Select inside if (hasNonMergedRow) + // was getting a selection out of range error when spliting rows that contained mergered rows + // only need to do this if we inserted rows + // include new rows in selection + this.Select(cr.r1, cr.c1, cr.r2 + numSelRows, cr.c2); } - // include new rows in selection - this.Select(cr.r1, cr.c1, cr.r2 + numSelRows, cr.c2); //if a merged range is part of the selectin, try to split it foreach (CellRange sel in MySelection) {