From c61ec8ee3b33939532d56ead7f5b7b52fefad5c5 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Mon, 11 Mar 2019 06:08:05 -0700 Subject: [PATCH] GAL: Handle negative line widths When displaying negative line width elements, the outline of the item should be hidden rather than displayed. Fixes: lp:1819247 * https://bugs.launchpad.net/kicad/+bug/1819247 --- eeschema/sch_painter.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/eeschema/sch_painter.cpp b/eeschema/sch_painter.cpp index 977fcbf405..beda38551b 100644 --- a/eeschema/sch_painter.cpp +++ b/eeschema/sch_painter.cpp @@ -318,12 +318,18 @@ bool SCH_PAINTER::setColors( const LIB_ITEM* aItem, int aLayer ) if( aItem->IsMoving() || aItem->IsDragging() || aItem->IsResized() ) color = color.WithAlpha( 0.75 ); - m_gal->SetIsStroke( true ); m_gal->SetStrokeColor( color ); - m_gal->SetLineWidth( aItem->GetPenSize() ); - m_gal->SetIsFill( aItem->GetFillMode() == FILLED_SHAPE ); m_gal->SetFillColor( color ); + + if( aItem->GetPenSize() > 0 ) + { + m_gal->SetIsStroke( true ); + m_gal->SetLineWidth( aItem->GetPenSize() ); + } + else + m_gal->SetIsStroke( false ); + return true; }