fixed removing the children in ShellBrowser::InsertSubitems()

svn path=/trunk/; revision=20663
This commit is contained in:
Thomas Bluemel
2006-01-07 18:19:10 +00:00
parent dc3eee3122
commit bdb8efa083
@@ -293,6 +293,7 @@ void ShellBrowser::OnTreeItemExpanding(int idCtrl, LPNMTREEVIEW pnmtv)
int ShellBrowser::InsertSubitems(HTREEITEM hParentItem, Entry* entry, IShellFolder* pParentFolder)
{
HTREEITEM hchild, hnext;
CONTEXT("ShellBrowser::InsertSubitems()");
WaitCursor wait;
@@ -308,7 +309,8 @@ int ShellBrowser::InsertSubitems(HTREEITEM hParentItem, Entry* entry, IShellFold
}
// remove old children items
for(HTREEITEM hchild,hnext=TreeView_GetChild(_left_hwnd, hParentItem); hchild=hnext; ) {
hnext = hchild = TreeView_GetChild(_left_hwnd, hParentItem);
while((hchild=hnext) != NULL) {
hnext = TreeView_GetNextSibling(_left_hwnd, hchild);
TreeView_DeleteItem(_left_hwnd, hchild);
}