Ensure wxGenericListCtrl item selected from keyboard is visible

When using the keyboard to select an item by typing the first characters of
its name, we need to make the item visible in addition to selecting it.

Closes #16336.
This commit is contained in:
Jonathan Dagresta 2016-05-13 15:30:13 +02:00 committed by Vadim Zeitlin
parent 360416dfed
commit 306597c4fa

View File

@ -3015,6 +3015,7 @@ void wxListMainWindow::OnChar( wxKeyEvent &event )
SetItemState(item,
wxLIST_STATE_FOCUSED | wxLIST_STATE_SELECTED,
wxLIST_STATE_FOCUSED | wxLIST_STATE_SELECTED);
EnsureVisible(item);
// Reset the bell flag if it had been temporarily disabled
// before.