diff --git a/funcext/tvclib/utslvcltree.tsf b/funcext/tvclib/utslvcltree.tsf index eeee9cd..f9d8393 100644 --- a/funcext/tvclib/utslvcltree.tsf +++ b/funcext/tvclib/utslvcltree.tsf @@ -485,8 +485,8 @@ type TcustomTreeCtlNode = class(TVirtualListItem) if self=Owner.RootNode then begin while ItemCount>0 DO - begin - DeleteChildNode(FItems[0]); + begin + DeleteNodeByIndex(0);//DeleteChildNode(FItems[0]); end r := false; end @@ -1862,7 +1862,9 @@ type TcustomTreeCtl = class(TVirtualList) begin if FRootItem then begin + flockchangedcall := true; FRootItem.DeleteChildren(); + flockchangedcall := false; end end property CurrentNode read FCurrentNode;