From d7b38d10c2d77f87f3aee54f52fc348450e09271 Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Tue, 18 Aug 2020 22:57:17 -0400 Subject: [PATCH] Use layer base color to create selection candidate color Fixes https://gitlab.com/kicad/code/kicad/-/issues/5072 --- pcbnew/pcb_painter.cpp | 3 +-- pcbnew/pcb_painter.h | 3 --- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 057d27726a..13eacdf386 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -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( item )->PadShouldBeNPTH() ) diff --git a/pcbnew/pcb_painter.h b/pcbnew/pcb_painter.h index 409f0ba038..d01c9f2424 100644 --- a/pcbnew/pcb_painter.h +++ b/pcbnew/pcb_painter.h @@ -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;