Fix list box unit test under wxGTK.
Select an item initially to prevent GTK from doing it automatically as soon as the listbox is clicked anywhere (even outside of the items area). This makes all GUI tests finally pass under wxGTK. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65938 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
00d45d0452
commit
24d7c81c32
@ -226,6 +226,13 @@ void ListBoxTestCase::ClickNotOnItem()
|
||||
|
||||
m_list->Append(testitems);
|
||||
|
||||
// It is important to set a valid selection: if the control doesn't have
|
||||
// any, clicking anywhere in it, even outside of any item, selects the
|
||||
// first item in the control under GTK resulting in a selection changed
|
||||
// event. This is not a wx bug, just the native platform behaviour so
|
||||
// simply avoid it by starting with a valid selection.
|
||||
m_list->SetSelection(0);
|
||||
|
||||
m_list->Update();
|
||||
m_list->Refresh();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user