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:
juha 2011-06-25 12:56:49 +00:00
parent 1e48978d7d
commit 481b0956e0

View File

@ -344,11 +344,16 @@ begin
end;
function TCustomShellTreeView.CanExpand(Node: TTreeNode): Boolean;
var
OldAutoExpand: Boolean;
begin
Result:=inherited CanExpand(Node);
if not Result then exit;
OldAutoExpand:=AutoExpand;
AutoExpand:=False;
Node.DeleteChildren;
Result := PopulateTreeNodeWithFiles(Node, GetPathFromNode(Node));
AutoExpand:=OldAutoExpand;
end;
constructor TCustomShellTreeView.Create(AOwner: TComponent);