From 2f4d6f434a5b1c2dcb571c2bc83565e645d5832d Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Thu, 4 Feb 2016 21:36:44 +0100 Subject: [PATCH] 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. --- samples/widgets/itemcontainer.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/samples/widgets/itemcontainer.cpp b/samples/widgets/itemcontainer.cpp index da31237098..ba0afc0c74 100644 --- a/samples/widgets/itemcontainer.cpp +++ b/samples/widgets/itemcontainer.cpp @@ -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"));