Sort reference data used in tests in widgets sample in dictionary order.

Contents of controls (like ListBox, Choice, ComboBox) created with wxXX_SORT flag is sorted in dictionary order and therefore reference data items used in tests in widgets sample need to be sorted in this order too.

See #15896.
This commit is contained in:
Artur Wieczorek
2016-02-04 21:36:44 +01:00
parent cb26668204
commit 2f4d6f434a

View File

@@ -68,7 +68,13 @@ private:
ItemContainerWidgetsPage::ItemContainerWidgetsPage(WidgetsBookCtrl *book,
wxImageList *image_list,
const char *const icon[])
: WidgetsPage(book, image_list, icon), m_trackedDataObjects(0)
: WidgetsPage(book, image_list, icon)
#if defined(__WXMSW__) || defined(__WXGTK__)
// Reference data needs to be sorted in a dictionary order
// since control's items are sorted in this order too.
, m_itemsSorted(wxDictionaryStringSortAscending)
#endif // __WXMSW__ || __WXGTK__
, m_trackedDataObjects(0)
{
m_items.Add(wxT("This"));
m_items.Add(wxT("is"));