Commit f9b14fda authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

comctl32/treeview: Store item state supplied from TVN_GETDISPINFO handler.

parent 1fa1c72d
......@@ -468,10 +468,11 @@ static void test_callback(void)
tvi.hItem = hRoot;
tvi.mask = TVIF_IMAGE;
tvi.state = INDEXTOSTATEIMAGEMASK(1);
tvi.stateMask = 0;
ret = TreeView_GetItem(hTree, &tvi);
expect(TRUE, ret);
/* handler sets TVIS_SELECTED as well */
todo_wine ok(tvi.state == (TVIS_FOCUSED | TVIS_SELECTED | INDEXTOSTATEIMAGEMASK(2) | INDEXTOOVERLAYMASK(3)), "got 0x%x\n", tvi.state);
ok(tvi.state == (TVIS_FOCUSED | TVIS_SELECTED | INDEXTOSTATEIMAGEMASK(2) | INDEXTOOVERLAYMASK(3)), "got 0x%x\n", tvi.state);
g_disp_set_stateimage = FALSE;
ok_sequence(sequences, PARENT_SEQ_INDEX, parent_get_dispinfo_seq,
......
......@@ -815,6 +815,12 @@ TREEVIEW_UpdateDispInfo(const TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *wineItem,
if (mask & TVIF_CHILDREN)
wineItem->cChildren = callback.item.cChildren;
if (callback.item.mask & TVIF_STATE)
{
wineItem->state &= ~callback.item.stateMask;
wineItem->state |= (callback.item.state & callback.item.stateMask);
}
/* These members are now permanently set. */
if (callback.item.mask & TVIF_DI_SETITEM)
wineItem->callbackMask &= ~callback.item.mask;
......
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