comctl32/treeview: Fix TVN_DELETEITEM to use item that is about to be deleted.
This commit is contained in:
parent
04e5e9cfa0
commit
4633fc5c03
|
@ -1359,10 +1359,8 @@ static void test_delete_items(void)
|
|||
|
||||
if (item_sequence[0]->count == 2)
|
||||
{
|
||||
todo_wine {
|
||||
ok(msg[0].lParam == (LPARAM)hChild, "expected %p, got %lx\n", hChild, msg[0].lParam);
|
||||
ok(msg[1].lParam == (LPARAM)hRoot, "expected %p, got %lx\n", hRoot, msg[1].lParam);
|
||||
}
|
||||
ok(msg[0].lParam == (LPARAM)hChild, "expected %p, got 0x%lx\n", hChild, msg[0].lParam);
|
||||
ok(msg[1].lParam == (LPARAM)hRoot, "expected %p, got 0x%lx\n", hRoot, msg[1].lParam);
|
||||
}
|
||||
|
||||
ret = SendMessageA(hTree, TVM_GETCOUNT, 0, 0);
|
||||
|
|
|
@ -1479,12 +1479,12 @@ TREEVIEW_RemoveItem(TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *wineItem)
|
|||
{
|
||||
TRACE("%p, (%s)\n", wineItem, TREEVIEW_ItemName(wineItem));
|
||||
|
||||
TREEVIEW_SendTreeviewNotify(infoPtr, TVN_DELETEITEMW, TVC_UNKNOWN,
|
||||
TVIF_HANDLE | TVIF_PARAM, wineItem, 0);
|
||||
|
||||
if (wineItem->firstChild)
|
||||
TREEVIEW_RemoveAllChildren(infoPtr, wineItem);
|
||||
|
||||
TREEVIEW_SendTreeviewNotify(infoPtr, TVN_DELETEITEMW, TVC_UNKNOWN,
|
||||
TVIF_HANDLE | TVIF_PARAM, wineItem, 0);
|
||||
|
||||
TREEVIEW_UnlinkItem(wineItem);
|
||||
|
||||
infoPtr->uNumItems--;
|
||||
|
|
Loading…
Reference in New Issue