Fall back on copper color when net color is not found
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5540
This commit is contained in:
parent
d6be0be177
commit
4433259c80
|
@ -283,8 +283,9 @@ COLOR4D PCB_RENDER_SETTINGS::GetColor( const VIEW_ITEM* aItem, int aLayer ) cons
|
||||||
netColor = jj->second;
|
netColor = jj->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( netColor != COLOR4D::UNSPECIFIED )
|
if( netColor == COLOR4D::UNSPECIFIED )
|
||||||
{
|
netColor = color;
|
||||||
|
|
||||||
if( item->IsSelected() )
|
if( item->IsSelected() )
|
||||||
{
|
{
|
||||||
// Selection brightening overrides highlighting
|
// Selection brightening overrides highlighting
|
||||||
|
@ -301,7 +302,6 @@ COLOR4D PCB_RENDER_SETTINGS::GetColor( const VIEW_ITEM* aItem, int aLayer ) cons
|
||||||
|
|
||||||
color = netColor;
|
color = netColor;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else if( !item->IsSelected() && m_highlightEnabled )
|
else if( !item->IsSelected() && m_highlightEnabled )
|
||||||
{
|
{
|
||||||
// Single net highlight mode
|
// Single net highlight mode
|
||||||
|
|
Loading…
Reference in New Issue