LCL/ShellCtrls: Avoid unnecessary updates of the ListView by TShellTreeView.UpdateView.

This commit is contained in:
wp_xyz 2023-11-13 19:51:08 +01:00
parent 2edaae58fb
commit cd92f94f6b

View File

@ -1315,8 +1315,10 @@ begin
TopItem := Items.FindNodeWithTextPath(topNodePath);
end;
// Force synchronization of associated ShellListView
if Assigned(FShellListView) then
// Force synchronization of associated ShellListView, but only if the
// refresh affects the selected tree node.
if Assigned(FShellListView) and
not ((AStartDir <> '') and (pos(AStartDir, FShellListView.FRoot) = 0)) then
begin
inc(FUpdateLock);
try