Use dedicated function to get common value label in wxPropertyGrid

This commit is contained in:
Artur Wieczorek 2023-01-06 17:51:32 +02:00
parent 6d9e362b1f
commit dec03c5d89
2 changed files with 2 additions and 3 deletions

View file

@ -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

View file

@ -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