mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 19:39:28 +02:00
drawgrid: fix SetSelection that was causing exception, if too big range is given
git-svn-id: trunk@24609 -
This commit is contained in:
parent
7766b8ea65
commit
b55e278c6e
@ -4542,6 +4542,8 @@ begin
|
|||||||
CancelSelection
|
CancelSelection
|
||||||
else begin
|
else begin
|
||||||
fRange:=NormalizarRect(aValue);
|
fRange:=NormalizarRect(aValue);
|
||||||
|
if fRange.Right>=ColCount then fRange.Right:=ColCount-1;
|
||||||
|
if fRange.Bottom>=RowCount then fRange.Bottom:=RowCount-1;
|
||||||
Invalidate;
|
Invalidate;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user