From b81abd0d1d0fcde8db54f8c5e736b2b9daaf2ea0 Mon Sep 17 00:00:00 2001 From: Gilles Depeyrot Date: Fri, 26 Jan 2001 20:59:41 +0000 Subject: [PATCH] correction to maintain data array in synch with string array git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9175 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/listbox.cpp | 5 ++++- src/mac/listbox.cpp | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/mac/carbon/listbox.cpp b/src/mac/carbon/listbox.cpp index 6564af7b77..17efb46fab 100644 --- a/src/mac/carbon/listbox.cpp +++ b/src/mac/carbon/listbox.cpp @@ -173,9 +173,12 @@ int wxListBox::DoAppend(const wxString& item) if( wxApp::s_macDefaultEncodingIsPC ) { m_stringArray.Add( wxMacMakeMacStringFromPC( item ) ) ; + m_dataArray.Add( NULL ); } - else + else { m_stringArray.Add( item ) ; + m_dataArray.Add( NULL ); + } m_noItems ++; MacAppend( item ) ; diff --git a/src/mac/listbox.cpp b/src/mac/listbox.cpp index 6564af7b77..17efb46fab 100644 --- a/src/mac/listbox.cpp +++ b/src/mac/listbox.cpp @@ -173,9 +173,12 @@ int wxListBox::DoAppend(const wxString& item) if( wxApp::s_macDefaultEncodingIsPC ) { m_stringArray.Add( wxMacMakeMacStringFromPC( item ) ) ; + m_dataArray.Add( NULL ); } - else + else { m_stringArray.Add( item ) ; + m_dataArray.Add( NULL ); + } m_noItems ++; MacAppend( item ) ; -- 2.50.0