grids, use CleanSelection for invalid selecction

git-svn-id: trunk@10336 -
This commit is contained in:
jesus 2006-12-16 08:40:40 +00:00
parent 67203ca7c6
commit 90dcf1e1af

View File

@ -3692,9 +3692,14 @@ end;
procedure TCustomGrid.SetSelection(const AValue: TGridRect);
begin
if goRangeSelect in Options then begin
fRange:=NormalizarRect(aValue);
Invalidate;
if goRangeSelect in Options then
with AValue do begin
if (Left<0)and(Top<0)and(Right<0)and(Bottom<0) then
CancelSelection
else begin
fRange:=NormalizarRect(aValue);
Invalidate;
end;
end;
end;