From b0e42d7ce3a7edaa90bc4f8f78c48e37c10f966f Mon Sep 17 00:00:00 2001 From: John Date: Wed, 4 May 2011 14:46:08 +0000 Subject: [PATCH] --- PROMS/Volian.Controls.Library/VlnFlexGrid.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/PROMS/Volian.Controls.Library/VlnFlexGrid.cs b/PROMS/Volian.Controls.Library/VlnFlexGrid.cs index 0067daa8..1bbe96fc 100644 --- a/PROMS/Volian.Controls.Library/VlnFlexGrid.cs +++ b/PROMS/Volian.Controls.Library/VlnFlexGrid.cs @@ -640,6 +640,10 @@ namespace Volian.Controls.Library int top = 0; int col = 0; int row = 0; + int strow = Selection.r1; + int stcol = Selection.c1; + int erow = Selection.r2; + int ecol = Selection.c2; while (e.X > left && col < Cols.Count) { left += Cols[col].Width > 0 ? Cols[col].Width : Cols.DefaultSize; @@ -652,8 +656,11 @@ namespace Volian.Controls.Library } col--; row--; + //Console.WriteLine("Mousedown Selection {0}", Selection); //Console.WriteLine("Mousedown Row, Col [{0},{1}]", row, col); - Select(row, col); + erow = Math.Max(erow, row); + ecol = Math.Max(ecol, col); + Select(strow, stcol, erow, ecol); } @@ -1981,6 +1988,7 @@ namespace Volian.Controls.Library { this.MergedRanges.Add(this.Selection,true); this.Invalidate(); + this.Select(Selection.r1, Selection.c1); } public bool IsInMergeRange() {