diff --git a/include/wx/propgrid/propgrid.h b/include/wx/propgrid/propgrid.h index f23c52efcc..fe6ad9f2c4 100644 --- a/include/wx/propgrid/propgrid.h +++ b/include/wx/propgrid/propgrid.h @@ -1136,7 +1136,7 @@ public: wxString GetCommonValueLabel( unsigned int i ) const { wxCHECK_MSG( i < m_commonValues.size(), wxString(), "Invalid item index" ); - return GetCommonValue(i)->GetLabel(); + return m_commonValues[i]->GetLabel(); } // Returns index of common value that will truly change value to diff --git a/src/propgrid/editors.cpp b/src/propgrid/editors.cpp index 4cb0017210..6be641df03 100644 --- a/src/propgrid/editors.cpp +++ b/src/propgrid/editors.cpp @@ -716,8 +716,7 @@ void wxPropertyGrid::OnComboItemPaint( const wxPGComboBox* pCb, comValIndex = item - choiceCount; if ( !p->IsValueUnspecified() || !(flags & wxODCB_PAINTING_CONTROL) ) { - const wxPGCommonValue* cv = GetCommonValue(comValIndex); - text = cv->GetLabel(); + text = GetCommonValueLabel(comValIndex); } } else