Commit 597cb552 authored by Susan Farley's avatar Susan Farley Committed by Alexandre Julliard

Update the edit box before rolling up the listbox, so the

selection isn't lost.
parent c96e7b95
......@@ -1395,18 +1395,6 @@ static LRESULT COMBO_Command( LPHEADCOMBO lphc, WPARAM wParam, HWND hWnd )
TRACE("[%04x]: lbox selection change [%04x]\n",
CB_HWND(lphc), lphc->wState );
/* do not roll up if selection is being tracked
* by arrowkeys in the dropdown listbox */
if( (lphc->dwStyle & CBS_SIMPLE) ||
((lphc->wState & CBF_DROPPED) && !(lphc->wState & CBF_NOROLLUP)) )
{
CBRollUp( lphc, (HIWORD(wParam) == LBN_SELCHANGE), TRUE );
}
else lphc->wState &= ~CBF_NOROLLUP;
CB_NOTIFY( lphc, CBN_SELCHANGE );
if( HIWORD(wParam) == LBN_SELCHANGE)
{
if( lphc->wState & CBF_EDIT )
......@@ -1421,6 +1409,18 @@ static LRESULT COMBO_Command( LPHEADCOMBO lphc, WPARAM wParam, HWND hWnd )
InvalidateRect(CB_HWND(lphc), &lphc->textRect, TRUE);
}
/* do not roll up if selection is being tracked
* by arrowkeys in the dropdown listbox */
if( (lphc->dwStyle & CBS_SIMPLE) ||
((lphc->wState & CBF_DROPPED) && !(lphc->wState & CBF_NOROLLUP)) )
{
CBRollUp( lphc, (HIWORD(wParam) == LBN_SELCHANGE), TRUE );
}
else lphc->wState &= ~CBF_NOROLLUP;
CB_NOTIFY( lphc, CBN_SELCHANGE );
/* fall through */
case LBN_SETFOCUS:
......
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