Fixed broken wxMultiChoiceProperty::ValueToString()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56366 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Jaakko Salli
2008-10-16 17:36:07 +00:00
parent c324ed9459
commit 102c9a42e8
2 changed files with 7 additions and 6 deletions

View File

@@ -406,7 +406,7 @@ public:
protected:
void GenerateValueAsString( wxString* target ) const;
void GenerateValueAsString( wxVariant& value, wxString* target ) const;
// Returns translation of values into string indices.
wxArrayInt GetValueAsIndices() const;

View File

@@ -1731,7 +1731,7 @@ wxMultiChoiceProperty::~wxMultiChoiceProperty()
void wxMultiChoiceProperty::OnSetValue()
{
GenerateValueAsString(&m_display);
GenerateValueAsString(m_value, &m_display);
}
wxString wxMultiChoiceProperty::ValueToString( wxVariant& value,
@@ -1742,16 +1742,17 @@ wxString wxMultiChoiceProperty::ValueToString( wxVariant& value,
return m_display;
wxString s;
GenerateValueAsString(&s);
GenerateValueAsString(value, &s);
return s;
}
void wxMultiChoiceProperty::GenerateValueAsString( wxString* target ) const
void wxMultiChoiceProperty::GenerateValueAsString( wxVariant& value,
wxString* target ) const
{
wxArrayString strings;
if ( m_value.GetType() == wxPG_VARIANT_TYPE_ARRSTRING )
strings = m_value.GetArrayString();
if ( value.GetType() == wxPG_VARIANT_TYPE_ARRSTRING )
strings = value.GetArrayString();
wxString& tempStr = *target;
unsigned int i;