Browse Source

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
pull/13/head
Seth Hillbrand 7 years ago
parent
commit
c61ec8ee3b
  1. 12
      eeschema/sch_painter.cpp

12
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;
}

Loading…
Cancel
Save