mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-09 21:35:57 +02:00
LCL: in ShellTreeView fix an eternal loop when expanding a node and AutoExpand is True. Issue #19572.
git-svn-id: trunk@31382 -
This commit is contained in:
parent
1e48978d7d
commit
481b0956e0
@ -344,11 +344,16 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
function TCustomShellTreeView.CanExpand(Node: TTreeNode): Boolean;
|
function TCustomShellTreeView.CanExpand(Node: TTreeNode): Boolean;
|
||||||
|
var
|
||||||
|
OldAutoExpand: Boolean;
|
||||||
begin
|
begin
|
||||||
Result:=inherited CanExpand(Node);
|
Result:=inherited CanExpand(Node);
|
||||||
if not Result then exit;
|
if not Result then exit;
|
||||||
|
OldAutoExpand:=AutoExpand;
|
||||||
|
AutoExpand:=False;
|
||||||
Node.DeleteChildren;
|
Node.DeleteChildren;
|
||||||
Result := PopulateTreeNodeWithFiles(Node, GetPathFromNode(Node));
|
Result := PopulateTreeNodeWithFiles(Node, GetPathFromNode(Node));
|
||||||
|
AutoExpand:=OldAutoExpand;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
constructor TCustomShellTreeView.Create(AOwner: TComponent);
|
constructor TCustomShellTreeView.Create(AOwner: TComponent);
|
||||||
|
Loading…
Reference in New Issue
Block a user