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,6 +850,7 @@ void PAD::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>&
aList.emplace_back( _( "NetClass" ), UnescapeString( GetNetClass()->GetName() ) );
if( GetAttribute() == PAD_ATTRIB_SMD || GetAttribute() == PAD_ATTRIB_CONN )
aList.emplace_back( _( "Layer" ), layerMaskDescribe() );
// Show the pad shape, attribute and property
@ -1075,18 +1076,35 @@ wxString PAD::ShowPadAttr() const
wxString PAD::GetSelectMenuText( EDA_UNITS aUnits ) const
{
if( GetName().IsEmpty() )
{
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
{
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() );
}
}
}