This commit is contained in:
John Jenko 2011-05-04 14:46:08 +00:00
parent ab7b73f3bf
commit b0e42d7ce3

View File

@ -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()
{