Don't try and highlight netnames or holes of selected items.

Fixes https://gitlab.com/kicad/code/kicad/issues/9256
This commit is contained in:
Jeff Young 2021-09-27 23:19:29 +01:00
parent 3413358992
commit 9f841da98e
1 changed files with 7 additions and 1 deletions

View File

@ -62,8 +62,14 @@ void RENDER_SETTINGS::update()
m_layerColorsHi[i] = m_layerColors[i].Brightened( m_highlightFactor );
m_layerColorsDark[i] = m_layerColors[i].Darkened( 1.0 - m_highlightFactor );
if( IsNetnameLayer( i ) || IsHoleLayer( i ) )
{
m_layerColorsSel[i] = m_layerColors[i];
continue;
}
// Linear brightening doesn't work well for colors near white
double factor = ( m_selectFactor * 0.6 ) + pow( m_layerColors[i].GetBrightness(), 3 );
double factor = ( m_selectFactor * 0.5 ) + pow( m_layerColors[i].GetBrightness(), 3 );
factor = std::min( 1.0, factor );
m_layerColorsSel[i] = m_layerColors[i].Brightened( factor );