Fix effective pen width when plotting wires.

Fixes https://gitlab.com/kicad/code/kicad/issues/9625
This commit is contained in:
Jeff Young 2021-11-12 16:27:08 +00:00
parent fd6a75b779
commit 1e151b1bcb
2 changed files with 2 additions and 14 deletions

View File

@ -345,7 +345,7 @@ void DIALOG_PLOT_SCHEMATIC::getPlotOptions( RENDER_SETTINGS* aSettings )
}
aSettings->LoadColors( colors );
aSettings->SetDefaultPenWidth( (int) m_defaultLineWidth.GetValue() );
aSettings->SetMinPenWidth( (int) m_defaultLineWidth.GetValue() );
if( m_plotBackgroundColor->GetValue() )
aSettings->SetBackgroundColor( colors->GetColor( LAYER_SCHEMATIC_BACKGROUND ) );

View File

@ -833,7 +833,7 @@ bool SCH_LINE::doIsConnected( const wxPoint& aPosition ) const
void SCH_LINE::Plot( PLOTTER* aPlotter ) const
{
auto* settings = static_cast<KIGFX::SCH_RENDER_SETTINGS*>( aPlotter->RenderSettings() );
int penWidth;
int penWidth = std::max( GetPenWidth(), settings->GetMinPenWidth() );
COLOR4D color = GetLineColor();
if( color == COLOR4D::UNSPECIFIED )
@ -841,18 +841,6 @@ void SCH_LINE::Plot( PLOTTER* aPlotter ) const
aPlotter->SetColor( color );
switch( m_layer )
{
case LAYER_WIRE: penWidth = settings->m_DefaultWireThickness; break;
case LAYER_BUS: penWidth = settings->m_DefaultBusThickness; break;
default: penWidth = GetPenWidth(); break;
}
if( m_stroke.GetWidth() != 0 )
penWidth = m_stroke.GetWidth();
penWidth = std::max( penWidth, settings->GetMinPenWidth() );
aPlotter->SetCurrentLineWidth( penWidth );
aPlotter->SetDash( GetEffectiveLineStyle() );