mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-03 00:00:39 +02:00
LCL: Fix range check error in StringGrid when sorting and RowCount=FixedRows, issue #21947
git-svn-id: trunk@37167 -
This commit is contained in:
parent
d17e688df7
commit
ffa0f2e2dd
@ -2890,12 +2890,14 @@ procedure TCustomGrid.Sort(ColSorting: Boolean; index, IndxFrom, IndxTo: Integer
|
||||
until I>=R;
|
||||
end;
|
||||
begin
|
||||
CheckIndex(ColSorting, Index);
|
||||
CheckIndex(not ColSorting, IndxFrom);
|
||||
CheckIndex(not ColSorting, IndxTo);
|
||||
BeginUpdate;
|
||||
QuickSort(IndxFrom, IndxTo);
|
||||
EndUpdate;
|
||||
if RowCount>FixedRows then begin
|
||||
CheckIndex(ColSorting, Index);
|
||||
CheckIndex(not ColSorting, IndxFrom);
|
||||
CheckIndex(not ColSorting, IndxTo);
|
||||
BeginUpdate;
|
||||
QuickSort(IndxFrom, IndxTo);
|
||||
EndUpdate;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCustomGrid.doTopleftChange(dimChg: Boolean);
|
||||
|
Loading…
Reference in New Issue
Block a user