Show pin hidden state in menu text.
Fixes https://gitlab.com/kicad/code/kicad/issues/5625
This commit is contained in:
parent
0399d08aaa
commit
a072c22b74
|
@ -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 ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue