Commit 42c5ff79 authored by Florian Köberle's avatar Florian Köberle Committed by Alexandre Julliard

comctl32: Call TREEVIEW_SendExpanded after expanding.

parent 6521fc19
......@@ -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;
......
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment