mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 04:19:19 +02:00
Fixed Exception when sorting grid with no free columns or no free rows.
git-svn-id: trunk@20443 -
This commit is contained in:
parent
54811dc268
commit
083fce06ef
@ -8221,8 +8221,14 @@ end;
|
||||
|
||||
procedure TCustomDrawGrid.SortColRow(IsColumn: Boolean; index: Integer);
|
||||
begin
|
||||
if IsColumn then Sort(IsColumn, index, FFixedRows, RowCount-1)
|
||||
else Sort(IsColumn, index, FFixedCols, ColCount-1);
|
||||
if IsColumn then begin
|
||||
if (FFixedRows < RowCount) and (RowCount > 0) then
|
||||
Sort(IsColumn, index, FFixedRows, RowCount-1)
|
||||
end
|
||||
else begin
|
||||
if (FFixedCols < ColCount) and (ColCount > 0) then
|
||||
Sort(IsColumn, index, FFixedCols, ColCount-1);
|
||||
end
|
||||
end;
|
||||
|
||||
procedure TCustomDrawGrid.SortColRow(IsColumn: Boolean; Index, FromIndex,
|
||||
|
Loading…
Reference in New Issue
Block a user