From 61dfb42b6e912ca30932742c56e371f9c5e08a01 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 13 Jul 2014 12:17:16 +0000 Subject: [PATCH] Use dictionary sort for wxListBox strings. This should result in more expected, and more consistent with MSW, order of the items differing in case only. Also do the same for wxChoice in wxGTK1. Closes #16356. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76902 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk1/choice.cpp | 2 +- src/gtk1/listbox.cpp | 2 +- src/osx/listbox_osx.cpp | 2 +- src/univ/listbox.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gtk1/choice.cpp b/src/gtk1/choice.cpp index a822e02ca6..1488c40ebc 100644 --- a/src/gtk1/choice.cpp +++ b/src/gtk1/choice.cpp @@ -125,7 +125,7 @@ bool wxChoice::Create( wxWindow *parent, wxWindowID id, { // if our m_strings != NULL, Append() will check for it and insert // items in the correct order - m_strings = new wxSortedArrayString; + m_strings = new wxSortedArrayString(wxDictionaryStringSortAscending); } // begin with no selection diff --git a/src/gtk1/listbox.cpp b/src/gtk1/listbox.cpp index 1220748fa7..316bed1321 100644 --- a/src/gtk1/listbox.cpp +++ b/src/gtk1/listbox.cpp @@ -541,7 +541,7 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id, if ( style & wxLB_SORT ) { // this will change Append() behaviour - m_strings = new wxSortedArrayString; + m_strings = new wxSortedArrayString(wxDictionaryStringSortAscending); } else { diff --git a/src/osx/listbox_osx.cpp b/src/osx/listbox_osx.cpp index c48607ea5a..964b806f21 100644 --- a/src/osx/listbox_osx.cpp +++ b/src/osx/listbox_osx.cpp @@ -83,7 +83,7 @@ bool wxListBox::Create( return false; if ( IsSorted() ) - m_strings.sorted = new wxSortedArrayString; + m_strings.sorted = new wxSortedArrayString(wxDictionaryStringSortAscending); else m_strings.unsorted = new wxArrayString; diff --git a/src/univ/listbox.cpp b/src/univ/listbox.cpp index e549c27953..a448b9cbb9 100644 --- a/src/univ/listbox.cpp +++ b/src/univ/listbox.cpp @@ -190,7 +190,7 @@ bool wxListBox::Create(wxWindow *parent, return false; if ( IsSorted() ) - m_strings.sorted = new wxSortedArrayString; + m_strings.sorted = new wxSortedArrayString(wxDictionaryStringSortAscending); else m_strings.unsorted = new wxArrayString;