diff --git a/funcext/tvclib/utslvcltree.tsf b/funcext/tvclib/utslvcltree.tsf index c98dcfe..1532068 100644 --- a/funcext/tvclib/utslvcltree.tsf +++ b/funcext/tvclib/utslvcltree.tsf @@ -1101,7 +1101,18 @@ type TcustomTreeCtlNode = class(tsluibase) // it.UpDateHierarchy(); if Expanded and Owner.NodeInList(self) and it.Visible then //处理节点visibe 的问题 begin - preItem := FItems[idx-1]; + /////////////////处理隐藏节点导致插入次序显示问题///////////////////// + tidx := idx; + while tidx>0 do + begin + tidx--; + preItem := FItems[tidx]; + if preItem and preItem.Visible then + begin + break; + end else preItem := 0; + end + /////////////////////////////// bx := 0; if preItem then bx := Owner.GetItemIndex(preItem.GetLastShowNode())+1; else bx := owner.GetItemIndex(self)+1;