Use layer base color to create selection candidate color

Fixes https://gitlab.com/kicad/code/kicad/-/issues/5072
This commit is contained in:
Jon Evans 2020-08-18 22:57:17 -04:00
parent a0f2435ccd
commit d7b38d10c2
2 changed files with 1 additions and 5 deletions

View File

@ -62,7 +62,6 @@ PCB_RENDER_SETTINGS::PCB_RENDER_SETTINGS()
m_clearance = CL_NONE;
m_sketchGraphics = false;
m_sketchText = false;
m_selectionCandidateColor = COLOR4D( 0.0, 1.0, 0.0, 0.75 );
m_netColorMode = NET_COLOR_MODE::RATSNEST;
m_contrastModeDisplay = HIGH_CONTRAST_MODE::NORMAL;
@ -244,7 +243,7 @@ COLOR4D PCB_RENDER_SETTINGS::GetColor( const VIEW_ITEM* aItem, int aLayer ) cons
{
// Selection disambiguation
if( item->IsBrightened() )
return m_selectionCandidateColor;
return color.Brightened( m_selectFactor ).WithAlpha( 0.8 );
// Don't let pads that *should* be NPTHs get lost
if( item->Type() == PCB_PAD_T && dyn_cast<const D_PAD*>( item )->PadShouldBeNPTH() )

View File

@ -223,9 +223,6 @@ protected:
///> Clearance visibility settings
int m_clearance;
///> Color used for highlighting selection candidates
COLOR4D m_selectionCandidateColor;
///> How to display nets and netclasses with color overrides
NET_COLOR_MODE m_netColorMode;