mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-19 07:59:32 +02:00
LCL, fix dgTitles dbgrid option after emtpy grid, from Paul Ishenin, issue #15172
git-svn-id: trunk@22756 -
This commit is contained in:
parent
44b0233a93
commit
aa050e518f
@ -718,14 +718,15 @@ end;
|
|||||||
|
|
||||||
procedure TCustomDBGrid.EmptyGrid;
|
procedure TCustomDBGrid.EmptyGrid;
|
||||||
var
|
var
|
||||||
OldFixedCols: Integer;
|
OldFixedCols, OldFixedRows: Integer;
|
||||||
begin
|
begin
|
||||||
OldFixedCols := FixedCols;
|
OldFixedCols := FixedCols;
|
||||||
|
OldFixedRows := FixedRows;
|
||||||
Clear;
|
Clear;
|
||||||
ColCount := OldFixedCols + 1;
|
ColCount := OldFixedCols + 1;
|
||||||
RowCount := 2;
|
RowCount := OldFixedRows + 1;
|
||||||
FixedCols := OldFixedCols;
|
FixedCols := OldFixedCols;
|
||||||
FixedRows := 1;
|
FixedRows := OldFixedRows;
|
||||||
if dgIndicator in Options then
|
if dgIndicator in Options then
|
||||||
ColWidths[0]:=12;
|
ColWidths[0]:=12;
|
||||||
end;
|
end;
|
||||||
@ -1003,6 +1004,13 @@ begin
|
|||||||
FixedCols := FixedCols - 1;
|
FixedCols := FixedCols - 1;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
if (dgTitles in ChangedOptions) then begin
|
||||||
|
if dgTitles in FOptions then
|
||||||
|
FixedRows := FixedRows + 1
|
||||||
|
else
|
||||||
|
FixedRows := FixedRows - 1;
|
||||||
|
end;
|
||||||
|
|
||||||
if (dgAutoSizeColumns in ChangedOptions) then begin
|
if (dgAutoSizeColumns in ChangedOptions) then begin
|
||||||
Exclude(FGridStatus, gsAutoSized);
|
Exclude(FGridStatus, gsAutoSized);
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user