mirror of
https://github.com/reactos/wine.git
synced 2024-11-28 14:10:32 +00:00
comctl32/listview: Do nothing on LVM_CANCELEDITLABEL if there's no label.
This commit is contained in:
parent
5f059edcdf
commit
c39268967d
@ -5081,11 +5081,14 @@ static DWORD LISTVIEW_ApproximateViewRect(const LISTVIEW_INFO *infoPtr, INT nIte
|
||||
*/
|
||||
static LRESULT LISTVIEW_CancelEditLabel(LISTVIEW_INFO *infoPtr)
|
||||
{
|
||||
/* handle value will be lost after LISTVIEW_EndEditLabelT */
|
||||
HWND edit = infoPtr->hwndEdit;
|
||||
if (infoPtr->hwndEdit)
|
||||
{
|
||||
/* handle value will be lost after LISTVIEW_EndEditLabelT */
|
||||
HWND edit = infoPtr->hwndEdit;
|
||||
|
||||
LISTVIEW_EndEditLabelT(infoPtr, TRUE, IsWindowUnicode(infoPtr->hwndEdit));
|
||||
SendMessageW(edit, WM_CLOSE, 0, 0);
|
||||
LISTVIEW_EndEditLabelT(infoPtr, TRUE, IsWindowUnicode(infoPtr->hwndEdit));
|
||||
SendMessageW(edit, WM_CLOSE, 0, 0);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -3720,8 +3720,11 @@ static void test_canceleditlabel(void)
|
||||
insert_item(hwnd, 0);
|
||||
|
||||
/* try without edit created */
|
||||
flush_sequences(sequences, NUM_MSG_SEQUENCES);
|
||||
ret = SendMessage(hwnd, LVM_CANCELEDITLABEL, 0, 0);
|
||||
expect(TRUE, ret);
|
||||
ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq,
|
||||
"cancel edit label without edit", FALSE);
|
||||
|
||||
/* cancel without data change */
|
||||
SetFocus(hwnd);
|
||||
|
Loading…
Reference in New Issue
Block a user