Always show label of unspecified value item while drawing popup menu
The label of "unspecified value" shouldn't be displayed in the edit field but it should always be shown on the popup menu list.
This commit is contained in:
@@ -719,11 +719,10 @@ void wxPropertyGrid::OnComboItemPaint( const wxPGComboBox* pCb,
|
|||||||
int comValIndex = -1;
|
int comValIndex = -1;
|
||||||
|
|
||||||
const int choiceCount = choices.IsOk()? choices.GetCount(): 0;
|
const int choiceCount = choices.IsOk()? choices.GetCount(): 0;
|
||||||
|
|
||||||
if ( item >= choiceCount && p->GetDisplayedCommonValueCount() > 0 )
|
if ( item >= choiceCount && p->GetDisplayedCommonValueCount() > 0 )
|
||||||
{
|
{
|
||||||
comValIndex = item - choiceCount;
|
comValIndex = item - choiceCount;
|
||||||
if ( !p->IsValueUnspecified() )
|
if ( !p->IsValueUnspecified() || !(flags & wxODCB_PAINTING_CONTROL) )
|
||||||
{
|
{
|
||||||
const wxPGCommonValue* cv = GetCommonValue(comValIndex);
|
const wxPGCommonValue* cv = GetCommonValue(comValIndex);
|
||||||
text = cv->GetLabel();
|
text = cv->GetLabel();
|
||||||
@@ -747,7 +746,7 @@ void wxPropertyGrid::OnComboItemPaint( const wxPGComboBox* pCb,
|
|||||||
|
|
||||||
const wxBitmap* itemBitmap = NULL;
|
const wxBitmap* itemBitmap = NULL;
|
||||||
|
|
||||||
if ( choices.IsOk() && choices.Item(item).GetBitmap().IsOk() && comValIndex == -1 )
|
if ( comValIndex == -1 && choices.IsOk() && choices.Item(item).GetBitmap().IsOk() )
|
||||||
itemBitmap = &choices.Item(item).GetBitmap();
|
itemBitmap = &choices.Item(item).GetBitmap();
|
||||||
|
|
||||||
//
|
//
|
||||||
|
Reference in New Issue
Block a user