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:
Jon Evans 2020-09-07 11:51:55 -04:00
parent d6be0be177
commit 4433259c80
1 changed files with 16 additions and 16 deletions

View File

@ -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