Show better descriptions of through-hole pads.

This commit is contained in:
Jeff Young 2021-01-03 23:09:04 +00:00
parent 7378c2c3b3
commit d0b82ea26e
1 changed files with 26 additions and 8 deletions

View File

@ -850,7 +850,8 @@ void PAD::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>&
aList.emplace_back( _( "NetClass" ), UnescapeString( GetNetClass()->GetName() ) );
aList.emplace_back( _( "Layer" ), layerMaskDescribe() );
if( GetAttribute() == PAD_ATTRIB_SMD || GetAttribute() == PAD_ATTRIB_CONN )
aList.emplace_back( _( "Layer" ), layerMaskDescribe() );
// Show the pad shape, attribute and property
wxString props = ShowPadAttr();
@ -1076,16 +1077,33 @@ wxString PAD::GetSelectMenuText( EDA_UNITS aUnits ) const
{
if( GetName().IsEmpty() )
{
return wxString::Format( _( "Pad of %s on %s" ),
GetParent()->GetReference(),
layerMaskDescribe() );
if( GetAttribute() == PAD_ATTRIB_SMD || GetAttribute() == PAD_ATTRIB_CONN )
{
return wxString::Format( _( "Pad of %s on %s" ),
GetParent()->GetReference(),
layerMaskDescribe() );
}
else
{
return wxString::Format( _( "Through hole pad of %s" ),
GetParent()->GetReference() );
}
}
else
{
return wxString::Format( _( "Pad %s of %s on %s" ),
GetName(),
GetParent()->GetReference(),
layerMaskDescribe() );
if( GetAttribute() == PAD_ATTRIB_SMD || GetAttribute() == PAD_ATTRIB_CONN )
{
return wxString::Format( _( "Pad %s of %s on %s" ),
GetName(),
GetParent()->GetReference(),
layerMaskDescribe() );
}
else
{
return wxString::Format( _( "Through hole pad %s of %s" ),
GetName(),
GetParent()->GetReference() );
}
}
}