Use unit references in status bar.
Fixes https://gitlab.com/kicad/code/kicad/issues/11854
This commit is contained in:
parent
231ac567b8
commit
45ab15dc95
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Copyright (C) 2015 Jean-Pierre Charras, jaen-pierre.charras at wanadoo.fr
|
||||
* Copyright (C) 2015 Wayne Stambaugh <stambaughw@gmail.com>
|
||||
* Copyright (C) 2004-2021 KiCad Developers, see change_log.txt for contributors.
|
||||
* Copyright (C) 2004-2022 KiCad Developers, see change_log.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -53,7 +53,7 @@ void LIB_ITEM::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_IT
|
|||
if( m_unit == 0 )
|
||||
msg = _( "All" );
|
||||
else
|
||||
msg.Printf( wxT( "%d" ), m_unit );
|
||||
msg = LIB_SYMBOL::SubReference( m_unit, false );
|
||||
|
||||
aList.emplace_back( _( "Unit" ), msg );
|
||||
|
||||
|
|
|
@ -513,7 +513,9 @@ wxString LIB_SYMBOL::SubReference( int aUnit, bool aAddSeparator )
|
|||
subRef << wxChar( m_subpartIdSeparator );
|
||||
|
||||
if( m_subpartFirstId >= '0' && m_subpartFirstId <= '9' )
|
||||
{
|
||||
subRef << aUnit;
|
||||
}
|
||||
else
|
||||
{
|
||||
// use letters as notation. To allow more than 26 units, the sub ref
|
||||
|
|
|
@ -344,6 +344,8 @@ COLOR4D SCH_PAINTER::getRenderColor( const EDA_ITEM* aItem, int aLayer, bool aDr
|
|||
else if( aLayer == LAYER_NOTES_BACKGROUND )
|
||||
color = shape->GetFillColor();
|
||||
|
||||
// A filled shape means filled; if they didn't specify a fill colour then use the
|
||||
// border colour.
|
||||
if( color == COLOR4D::UNSPECIFIED )
|
||||
color = m_schSettings.GetLayerColor( LAYER_NOTES );
|
||||
}
|
||||
|
|
|
@ -196,13 +196,6 @@ void SCH_PIN::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITE
|
|||
|
||||
aList.emplace_back( _( "Type" ), _( "Pin" ) );
|
||||
|
||||
if( m_libPin->GetUnit() == 0 )
|
||||
msg = _( "All" );
|
||||
else
|
||||
msg.Printf( wxT( "%d" ), m_libPin->GetUnit() );
|
||||
|
||||
aList.emplace_back( _( "Unit" ), msg );
|
||||
|
||||
if( m_libPin->GetConvert() == LIB_ITEM::LIB_CONVERT::BASE )
|
||||
msg = _( "no" );
|
||||
else if( m_libPin->GetConvert() == LIB_ITEM::LIB_CONVERT::DEMORGAN )
|
||||
|
|
Loading…
Reference in New Issue