Show pin hidden state in menu text.

Fixes https://gitlab.com/kicad/code/kicad/issues/5625
This commit is contained in:
Jeff Young 2022-10-24 11:34:47 +01:00
parent 0399d08aaa
commit a072c22b74
1 changed files with 31 additions and 10 deletions

View File

@ -1324,20 +1324,41 @@ BITMAPS LIB_PIN::GetMenuImage() const
wxString LIB_PIN::GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const
{
if( !m_name.IsEmpty() )
if( IsVisible() )
{
return wxString::Format( _( "Pin %s [%s, %s, %s]" ),
GetShownNumber(),
UnescapeString( GetShownName() ),
GetElectricalTypeName(),
PinShapeGetText( m_shape ) );
if( !m_name.IsEmpty() )
{
return wxString::Format( _( "Pin %s [%s, %s, %s]" ),
GetShownNumber(),
UnescapeString( GetShownName() ),
GetElectricalTypeName(),
PinShapeGetText( m_shape ) );
}
else
{
return wxString::Format( _( "Pin %s [%s, %s]" ),
GetShownNumber(),
GetElectricalTypeName(),
PinShapeGetText( m_shape ) );
}
}
else
{
return wxString::Format( _( "Pin %s [%s, %s]" ),
GetShownNumber(),
GetElectricalTypeName(),
PinShapeGetText( m_shape ) );
if( !m_name.IsEmpty() )
{
return wxString::Format( _( "Hidden pin %s [%s, %s, %s]" ),
GetShownNumber(),
UnescapeString( GetShownName() ),
GetElectricalTypeName(),
PinShapeGetText( m_shape ) );
}
else
{
return wxString::Format( _( "Hidden pin %s [%s, %s]" ),
GetShownNumber(),
GetElectricalTypeName(),
PinShapeGetText( m_shape ) );
}
}
}