mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 01:09:46 +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);
|
procedure TCustomDrawGrid.SortColRow(IsColumn: Boolean; index: Integer);
|
||||||
begin
|
begin
|
||||||
if IsColumn then Sort(IsColumn, index, FFixedRows, RowCount-1)
|
if IsColumn then begin
|
||||||
else Sort(IsColumn, index, FFixedCols, ColCount-1);
|
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;
|
end;
|
||||||
|
|
||||||
procedure TCustomDrawGrid.SortColRow(IsColumn: Boolean; Index, FromIndex,
|
procedure TCustomDrawGrid.SortColRow(IsColumn: Boolean; Index, FromIndex,
|
||||||
|
Loading…
Reference in New Issue
Block a user