mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 19:49:50 +00:00
comctl32: Call TREEVIEW_SendExpanded after expanding.
This commit is contained in:
parent
6521fc192f
commit
42c5ff799a
2 changed files with 9 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue