mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-28 10:02:14 +00:00
FIX: Set variable pointing to parent before assigning parent as this might create the handle and use the variable.
This commit is contained in:
parent
101fbcd212
commit
ac96be5489
2 changed files with 5 additions and 4 deletions
|
|
@ -1214,6 +1214,8 @@ constructor TDrawGridEx.Create(AOwner: TComponent; AParent: TWinControl);
|
|||
begin
|
||||
inherited Create(AOwner);
|
||||
|
||||
ColumnsView := AParent as TColumnsFileView;
|
||||
|
||||
// Workaround for Lazarus issue 18832.
|
||||
// Set Fixed... before setting ...Count.
|
||||
FixedRows := 0;
|
||||
|
|
@ -1223,9 +1225,6 @@ begin
|
|||
RowCount := 0;
|
||||
ColCount := 0;
|
||||
|
||||
Self.Parent := AParent;
|
||||
ColumnsView := AParent as TColumnsFileView;
|
||||
|
||||
DoubleBuffered := True;
|
||||
Align := alClient;
|
||||
Options := [goFixedVertLine, goFixedHorzLine, goTabs, goRowSelect,
|
||||
|
|
@ -1234,6 +1233,7 @@ begin
|
|||
TitleStyle := tsStandard;
|
||||
TabStop := False;
|
||||
|
||||
Self.Parent := AParent;
|
||||
UpdateView;
|
||||
end;
|
||||
|
||||
|
|
|
|||
|
|
@ -1426,11 +1426,12 @@ constructor TColumnsDrawTree.Create(AOwner: TComponent; AParent: TWinControl);
|
|||
begin
|
||||
inherited Create(AOwner);
|
||||
|
||||
Self.Parent := AParent;
|
||||
ColumnsView := AParent as TColumnsFileViewVTV;
|
||||
|
||||
DragType := dtVCL;
|
||||
HintMode := hmHint;
|
||||
|
||||
Self.Parent := AParent;
|
||||
end;
|
||||
|
||||
procedure TColumnsDrawTree.AfterConstruction;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue