mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-04-19 12:08:05 -05:00
The dummy drag-list item wasn't being removed on a single-click or
double-click (DL_BEGINDRAG followed immediately by DL_DROPPED with no intervening DL_DRAGGING). Fixed. [originally from svn r1391]
This commit is contained in:
parent
15517300d8
commit
96d1f87e19
10
winctrls.c
10
winctrls.c
@ -1024,21 +1024,21 @@ int handle_prefslist(struct prefslist *hdl,
|
|||||||
SetWindowLong(hwnd, DWL_MSGRESULT, DL_STOPCURSOR);
|
SetWindowLong(hwnd, DWL_MSGRESULT, DL_STOPCURSOR);
|
||||||
ret = 1; break;
|
ret = 1; break;
|
||||||
case DL_DROPPED:
|
case DL_DROPPED:
|
||||||
ret = 1;
|
if (hdl->dragging) {
|
||||||
if (!hdl->dragging) break;
|
|
||||||
dest = pl_itemfrompt(dlm->hWnd, dlm->ptCursor, TRUE);
|
dest = pl_itemfrompt(dlm->hWnd, dlm->ptCursor, TRUE);
|
||||||
if (dest > hdl->dummyitem) dest = hdl->dummyitem;
|
if (dest > hdl->dummyitem) dest = hdl->dummyitem;
|
||||||
DrawInsert (hwnd, dlm->hWnd, -1);
|
DrawInsert (hwnd, dlm->hWnd, -1);
|
||||||
|
}
|
||||||
SendDlgItemMessage(hwnd, hdl->listid,
|
SendDlgItemMessage(hwnd, hdl->listid,
|
||||||
LB_DELETESTRING, hdl->dummyitem, 0);
|
LB_DELETESTRING, hdl->dummyitem, 0);
|
||||||
|
if (hdl->dragging) {
|
||||||
hdl->dragging = 0;
|
hdl->dragging = 0;
|
||||||
if (dest >= 0) {
|
if (dest >= 0) {
|
||||||
/* Correct for "missing" item. This means you can't drag
|
/* Correct for "missing" item. */
|
||||||
* an item to the end, but that seems to be the way this
|
|
||||||
* control is used. */
|
|
||||||
if (dest > hdl->srcitem) dest--;
|
if (dest > hdl->srcitem) dest--;
|
||||||
pl_moveitem(hwnd, hdl->listid, hdl->srcitem, dest);
|
pl_moveitem(hwnd, hdl->listid, hdl->srcitem, dest);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
ret = 1; break;
|
ret = 1; break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user