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.

See #16336.

(cherry picked from commit 306597c4fa)
This commit is contained in:
Jonathan Dagresta
2016-05-13 15:30:13 +02:00
committed by Vadim Zeitlin
parent 99262787cb
commit 143e55b8df
2 changed files with 2 additions and 0 deletions

View File

@@ -2994,6 +2994,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.