From 8b8098d228f5bac0ff38ce69a4dcffc1fbf6bbba Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 1 Sep 2015 11:27:38 +0200 Subject: [PATCH] GAL canvas highlight net mode works on all layers. --- pcbnew/pcb_painter.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index aae53e6d71..1c33effe09 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -173,18 +173,18 @@ const COLOR4D& PCB_RENDER_SETTINGS::GetColor( const VIEW_ITEM* aItem, int aLayer netCode = conItem->GetNetCode(); } + // Single net highlight mode + if( m_highlightEnabled && netCode == m_highlightNetcode ) + return m_layerColorsHi[aLayer]; + // Return grayish color for non-highlighted layers in the high contrast mode if( m_hiContrastEnabled && m_activeLayers.count( aLayer ) == 0 ) return m_hiContrastColor; - // Single net highlight mode + // Catch the case when highlight and high-contraste modes are enabled + // and we are drawing a not highlighted track if( m_highlightEnabled ) - { - if( netCode == m_highlightNetcode ) - return m_layerColorsHi[aLayer]; - else - return m_layerColorsDark[aLayer]; - } + return m_layerColorsDark[aLayer]; // No special modificators enabled return m_layerColors[aLayer];