comctl32: Call TREEVIEW_SendExpanded after expanding.

This commit is contained in:
Florian Köberle 2010-07-17 10:02:10 +02:00 committed by Alexandre Julliard
parent 6521fc192f
commit 42c5ff799a
2 changed files with 9 additions and 5 deletions

View file

@ -918,7 +918,6 @@ static LRESULT CALLBACK parent_wnd_proc(HWND hWnd, UINT message, WPARAM wParam,
visibleItem = TreeView_GetNextItem(pHdr->hwndFrom, visibleItem, TVGN_NEXTVISIBLE);
*(HTREEITEM*)&rect = visibleItem;
ok(visibleItem != NULL, "There must be a visible item after the first visisble item.\n");
todo_wine
ok(SendMessage(pHdr->hwndFrom, TVM_GETITEMRECT, TRUE, (LPARAM)&rect), "Failed to get rect for second visible item.\n");
}
break;

View file

@ -3279,6 +3279,7 @@ TREEVIEW_Expand(TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *wineItem,
LONG orgNextTop = 0;
RECT scrollRect;
TREEVIEW_ITEM *nextItem, *tmpItem;
BOOL sendsNotifications;
TRACE("(%p, %p, partial=%d, %d\n", infoPtr, wineItem, bExpandPartial, bUser);
@ -3301,8 +3302,9 @@ TREEVIEW_Expand(TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *wineItem,
TRACE("TVE_EXPAND %p %s\n", wineItem, TREEVIEW_ItemName(wineItem));
if (bUser || ((wineItem->cChildren != 0) &&
!(wineItem->state & TVIS_EXPANDEDONCE)))
sendsNotifications = bUser || ((wineItem->cChildren != 0) &&
!(wineItem->state & TVIS_EXPANDEDONCE));
if (sendsNotifications)
{
if (!TREEVIEW_SendExpanding(infoPtr, wineItem, TVE_EXPAND))
{
@ -3314,8 +3316,6 @@ TREEVIEW_Expand(TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *wineItem,
return FALSE;
wineItem->state |= TVIS_EXPANDED;
TREEVIEW_SendExpanded(infoPtr, wineItem, TVE_EXPAND);
wineItem->state |= TVIS_EXPANDEDONCE;
}
else
{
@ -3384,6 +3384,11 @@ TREEVIEW_Expand(TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *wineItem,
}
}
if (sendsNotifications) {
TREEVIEW_SendExpanded(infoPtr, wineItem, TVE_EXPAND);
wineItem->state |= TVIS_EXPANDEDONCE;
}
return TRUE;
}