Handle border colors for SCH_SHAPEs.
Fixes https://gitlab.com/kicad/code/kicad/issues/10361
This commit is contained in:
parent
184bcf6520
commit
a23f6e4e92
|
@ -308,7 +308,7 @@ COLOR4D SCH_PAINTER::getRenderColor( const EDA_ITEM* aItem, int aLayer, bool aDr
|
|||
}
|
||||
else if( aItem->Type() == SCH_SHEET_T )
|
||||
{
|
||||
SCH_SHEET* sheet = (SCH_SHEET*) aItem;
|
||||
const SCH_SHEET* sheet = static_cast<const SCH_SHEET*>( aItem );
|
||||
|
||||
if( m_schSettings.m_OverrideItemColors )
|
||||
color = m_schSettings.GetLayerColor( aLayer );
|
||||
|
@ -320,6 +320,20 @@ COLOR4D SCH_PAINTER::getRenderColor( const EDA_ITEM* aItem, int aLayer, bool aDr
|
|||
if( color == COLOR4D::UNSPECIFIED )
|
||||
color = m_schSettings.GetLayerColor( aLayer );
|
||||
}
|
||||
else if( aItem->Type() == SCH_SHAPE_T )
|
||||
{
|
||||
const SCH_SHAPE* shape = static_cast<const SCH_SHAPE*>( aItem );
|
||||
|
||||
if( m_schSettings.m_OverrideItemColors )
|
||||
color = m_schSettings.GetLayerColor( aLayer );
|
||||
else if( aLayer == LAYER_NOTES )
|
||||
color = shape->GetStroke().GetColor();
|
||||
else if( aLayer == LAYER_NOTES_BACKGROUND )
|
||||
color = shape->GetFillColor();
|
||||
|
||||
if( color == COLOR4D::UNSPECIFIED )
|
||||
color = m_schSettings.GetLayerColor( aLayer );
|
||||
}
|
||||
|
||||
if( aItem->IsBrightened() ) // Selection disambiguation, net highlighting, etc.
|
||||
{
|
||||
|
@ -1395,7 +1409,7 @@ void SCH_PAINTER::draw( const SCH_SHAPE* aShape, int aLayer )
|
|||
}
|
||||
else if( aLayer == LAYER_NOTES )
|
||||
{
|
||||
int lineWidth = getLineWidth( aShape, drawingShadows );
|
||||
int lineWidth = getLineWidth( aShape, drawingShadows );
|
||||
|
||||
m_gal->SetIsFill( false );
|
||||
m_gal->SetIsStroke( true );
|
||||
|
|
|
@ -192,7 +192,7 @@ void SCH_SHAPE::Plot( PLOTTER* aPlotter ) const
|
|||
int SCH_SHAPE::GetPenWidth() const
|
||||
{
|
||||
if( m_stroke.GetWidth() > 0 )
|
||||
return GetWidth();
|
||||
return m_stroke.GetWidth();
|
||||
|
||||
// Historically 0 meant "default width" and negative numbers meant "don't stroke".
|
||||
if( GetWidth() < 0 && GetFillMode() != FILL_T::NO_FILL )
|
||||
|
|
Loading…
Reference in New Issue