Symbol editor, Pin table editor: always display a icon in Pin Type column

At least on Linux, if a null icon is used as icon in Pin Type column, other icons are not
displayed. So the workaround is to use a neutral icon when a specific icon cannot be used
(i.e. when pins are grouped)

Fixes: lp:1559542
https://bugs.launchpad.net/kicad/+bug/1559542
This commit is contained in:
jean-pierre charras 2018-01-20 09:59:15 +01:00
parent 673f03e595
commit d4dbdcd638
1 changed files with 9 additions and 1 deletions

View File

@ -459,7 +459,15 @@ void DIALOG_LIB_EDIT_PIN_TABLE::DataViewModel::Group::GetValue( wxVariant& aValu
values.insert( (*i)->GetString( aCol ) );
if( values.size() > 1 )
aValue << wxDataViewIconText( boost::algorithm::join( values, "," ), wxNullIcon );
{
// when multiple pins are grouped, thes have not necessary the same electrical type
// therefore use a neutral icon to show a type.
// Do Not use a null icon, because on some OS (Linux), for an obscure reason,
// if a null icon is used somewhere, no other icon is displayed
wxIcon icon_notype;
icon_notype.CopyFromBitmap( KiBitmap ( pintype_notspecif_xpm ) ); // could be tree_nosel_xpm
aValue << wxDataViewIconText( boost::algorithm::join( values, "," ), icon_notype );
}
else
m_Members.front()->GetValue( aValue, aCol );
}