Fix other stroke types still drawing the border regardless of enable
This commit is contained in:
parent
21c54f9721
commit
37717a8281
|
@ -2149,14 +2149,16 @@ void PCB_PAINTER::draw( const PCB_TEXTBOX* aTextBox, int aLayer )
|
||||||
m_gal->SetIsFill( true );
|
m_gal->SetIsFill( true );
|
||||||
m_gal->SetIsStroke( false );
|
m_gal->SetIsStroke( false );
|
||||||
|
|
||||||
|
if( aTextBox->IsBorderEnabled() )
|
||||||
|
{
|
||||||
if( lineStyle <= PLOT_DASH_TYPE::FIRST_TYPE )
|
if( lineStyle <= PLOT_DASH_TYPE::FIRST_TYPE )
|
||||||
{
|
{
|
||||||
if( aTextBox->IsBorderEnabled() && thickness > 0 )
|
if( thickness > 0 )
|
||||||
{
|
{
|
||||||
std::vector<VECTOR2I> pts = aTextBox->GetCorners();
|
std::vector<VECTOR2I> pts = aTextBox->GetCorners();
|
||||||
|
|
||||||
for( size_t ii = 0; ii < pts.size(); ++ii )
|
for( size_t ii = 0; ii < pts.size(); ++ii )
|
||||||
m_gal->DrawSegment( pts[ ii ], pts[ (ii + 1) % pts.size() ], thickness );
|
m_gal->DrawSegment( pts[ii], pts[( ii + 1 ) % pts.size()], thickness );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -2175,6 +2177,7 @@ void PCB_PAINTER::draw( const PCB_TEXTBOX* aTextBox, int aLayer )
|
||||||
for( SHAPE* shape : shapes )
|
for( SHAPE* shape : shapes )
|
||||||
delete shape;
|
delete shape;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if( resolvedText.Length() == 0 )
|
if( resolvedText.Length() == 0 )
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue