Skip to content

Commit 684fd09

Browse files
committed
Fix for #1211
1 parent e5c73e9 commit 684fd09

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Demos/Advanced/DrawTreeDemo.pas

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ interface
2626
uses
2727
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
2828
VirtualTrees, StdCtrls, {$ifdef GraphicEx} GraphicEx, {$else} JPEG, {$endif}
29-
ImgList, ComCtrls, UITypes;
29+
ImgList, ComCtrls, UITypes, System.ImageList;
3030

3131
type
3232
TDrawTreeForm = class(TForm)
@@ -543,10 +543,10 @@ procedure TDrawTreeForm.VDT1InitChildren(Sender: TBaseVirtualTree; Node: PVirtua
543543
GetOpenAndClosedIcons(ChildData.FullPath, ChildData.OpenIndex, ChildData.CloseIndex);
544544

545545
Sender.ValidateNode(Node, False);
546+
Inc(ChildCount);
546547
end;
547548
end;
548549
until FindNext(SR) <> 0;
549-
ChildCount := Sender.ChildCount[Node];
550550

551551
// finally sort node
552552
if ChildCount > 0 then

0 commit comments

Comments
 (0)