Only send TVN_ITEMEXPANDING for items marked as having children.

This commit is contained in:
Adam Gundy 2003-10-15 21:01:54 +00:00 committed by Alexandre Julliard
parent cf8b84c19f
commit c2d90611f6

View File

@ -3203,7 +3203,8 @@ TREEVIEW_Expand(TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *wineItem,
TRACE("TVE_EXPAND %p %s\n", wineItem, TREEVIEW_ItemName(wineItem));
if (bUser || !(wineItem->state & TVIS_EXPANDEDONCE))
if (bUser || ((wineItem->cChildren != 0) &&
!(wineItem->state & TVIS_EXPANDEDONCE)))
{
if (!TREEVIEW_SendExpanding(infoPtr, wineItem, TVE_EXPAND))
{