mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
UPD: When changing file list delete all nodes before setting new count because it is faster.
This commit is contained in:
parent
d83bf380a5
commit
26cbffc75f
1 changed files with 12 additions and 3 deletions
|
|
@ -757,9 +757,18 @@ end;
|
|||
|
||||
procedure TColumnsFileViewVTV.SetRowCount(Count: Integer);
|
||||
begin
|
||||
FUpdatingActiveFile := True;
|
||||
dgPanel.RootNodeCount := Count;
|
||||
FUpdatingActiveFile := False;
|
||||
if Count <> dgPanel.RootNodeCount then
|
||||
begin
|
||||
FUpdatingActiveFile := True;
|
||||
dgPanel.BeginUpdate;
|
||||
// If new node count is less then first delete all nodes and then create
|
||||
// new ones, because deleting only some nodes is much slower then deleting all.
|
||||
if Count < dgPanel.RootNodeCount then
|
||||
dgPanel.RootNodeCount := 0;
|
||||
dgPanel.RootNodeCount := Count;
|
||||
dgPanel.EndUpdate;
|
||||
FUpdatingActiveFile := False;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TColumnsFileViewVTV.SetColumns;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue