LCL/ShellTreeView: Speedup when opening a node with many subfolders a second time.

git-svn-id: trunk@65455 -
This commit is contained in:
wp 2021-07-15 08:47:38 +00:00
parent ee25f78baf
commit f22bca8150

View File

@ -617,9 +617,14 @@ begin
if not Result then exit; if not Result then exit;
OldAutoExpand:=AutoExpand; OldAutoExpand:=AutoExpand;
AutoExpand:=False; AutoExpand:=False;
Node.DeleteChildren; BeginUpdate;
Result := PopulateTreeNodeWithFiles(Node, GetPathFromNode(Node)); try
AutoExpand:=OldAutoExpand; Node.DeleteChildren;
Result := PopulateTreeNodeWithFiles(Node, GetPathFromNode(Node));
AutoExpand:=OldAutoExpand;
finally
EndUpdate;
end;
end; end;
constructor TCustomShellTreeView.Create(AOwner: TComponent); constructor TCustomShellTreeView.Create(AOwner: TComponent);