fpspreadsheet: Fix TWorksheetGrid focus rect on merged cells in being offset (fixed by "shobits1").

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4458 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2016-01-22 23:24:11 +00:00
parent 9dc3304375
commit 61db2acff8

View File

@ -2282,7 +2282,7 @@ begin
end;
{@@ ----------------------------------------------------------------------------
Draws the selection rectangle around selected cells, 3 pixels wide as in Excel.
Draws the selection rectangle around selected cells.
-------------------------------------------------------------------------------}
procedure TsCustomWorksheetGrid.DrawSelection;
var
@ -2299,7 +2299,7 @@ begin
if Worksheet.IsMerged(cell) then
begin
Worksheet.FindMergedRange(cell, r1,c1,r2,c2);
R := CellRect(r1, c1, r2, c2);
R := CellRect(GetGridCol(c1), GetGridRow(r1), GetGridCol(c2), GetGridRow(r2));
end else
R := CellRect(Selection.Left, Selection.Top, Selection.Right, Selection.Bottom);