Update the edit box before rolling up the listbox, so the
selection isn't lost.
This commit is contained in:
parent
c96e7b95c3
commit
597cb552ce
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue