diff --git a/eeschema/lib_arc.cpp b/eeschema/lib_arc.cpp index 150e643b4a..b1156d0f07 100644 --- a/eeschema/lib_arc.cpp +++ b/eeschema/lib_arc.cpp @@ -302,8 +302,14 @@ void LIB_ARC::Plot( PLOTTER* aPlotter, const wxPoint& aOffset, bool aFill, } bool already_filled = m_Fill == FILLED_WITH_BG_BODYCOLOR; - aPlotter->SetColor( GetLayerColor( LAYER_DEVICE ) ); - aPlotter->Arc( pos, -t2, -t1, m_Radius, already_filled ? NO_FILL : m_Fill, GetPenSize() ); + auto pen_size = GetPenSize(); + + if( !already_filled || pen_size > 0 ) + { + pen_size = std::max( 0, pen_size ); + aPlotter->SetColor( GetLayerColor( LAYER_DEVICE ) ); + aPlotter->Arc( pos, -t2, -t1, m_Radius, already_filled ? NO_FILL : m_Fill, GetPenSize() ); + } } diff --git a/eeschema/lib_bezier.cpp b/eeschema/lib_bezier.cpp index ae368bd725..ce6a4213e2 100644 --- a/eeschema/lib_bezier.cpp +++ b/eeschema/lib_bezier.cpp @@ -205,8 +205,14 @@ void LIB_BEZIER::Plot( PLOTTER* aPlotter, const wxPoint& aOffset, bool aFill, } bool already_filled = m_Fill == FILLED_WITH_BG_BODYCOLOR; - aPlotter->SetColor( GetLayerColor( LAYER_DEVICE ) ); - aPlotter->PlotPoly( cornerList, already_filled ? NO_FILL : m_Fill, GetPenSize() ); + auto pen_size = GetPenSize(); + + if( !already_filled || pen_size > 0 ) + { + pen_size = std::max( 0, pen_size ); + aPlotter->SetColor( GetLayerColor( LAYER_DEVICE ) ); + aPlotter->PlotPoly( cornerList, already_filled ? NO_FILL : m_Fill, GetPenSize() ); + } } diff --git a/eeschema/lib_circle.cpp b/eeschema/lib_circle.cpp index 3a4517425a..e9bf26c3b9 100644 --- a/eeschema/lib_circle.cpp +++ b/eeschema/lib_circle.cpp @@ -157,8 +157,14 @@ void LIB_CIRCLE::Plot( PLOTTER* aPlotter, const wxPoint& aOffset, bool aFill, } bool already_filled = m_Fill == FILLED_WITH_BG_BODYCOLOR; - aPlotter->SetColor( GetLayerColor( LAYER_DEVICE ) ); - aPlotter->Circle( pos, m_Radius * 2, already_filled ? NO_FILL : m_Fill, GetPenSize() ); + auto pen_size = GetPenSize(); + + if( !already_filled || pen_size > 0 ) + { + pen_size = std::max( 0, pen_size ); + aPlotter->SetColor( GetLayerColor( LAYER_DEVICE ) ); + aPlotter->Circle( pos, m_Radius * 2, already_filled ? NO_FILL : m_Fill, GetPenSize() ); + } } diff --git a/eeschema/lib_polyline.cpp b/eeschema/lib_polyline.cpp index 6c9cfd8c41..f263d1c92d 100644 --- a/eeschema/lib_polyline.cpp +++ b/eeschema/lib_polyline.cpp @@ -163,8 +163,14 @@ void LIB_POLYLINE::Plot( PLOTTER* aPlotter, const wxPoint& aOffset, bool aFill, } bool already_filled = m_Fill == FILLED_WITH_BG_BODYCOLOR; - aPlotter->SetColor( GetLayerColor( LAYER_DEVICE ) ); - aPlotter->PlotPoly( cornerList, already_filled ? NO_FILL : m_Fill, GetPenSize() ); + auto pen_size = GetPenSize(); + + if( !already_filled || pen_size > 0 ) + { + pen_size = std::max( 0, pen_size ); + aPlotter->SetColor( GetLayerColor( LAYER_DEVICE ) ); + aPlotter->PlotPoly( cornerList, already_filled ? NO_FILL : m_Fill, GetPenSize() ); + } } diff --git a/eeschema/lib_rectangle.cpp b/eeschema/lib_rectangle.cpp index eb57a2f51a..abb63eec54 100644 --- a/eeschema/lib_rectangle.cpp +++ b/eeschema/lib_rectangle.cpp @@ -147,8 +147,14 @@ void LIB_RECTANGLE::Plot( PLOTTER* aPlotter, const wxPoint& aOffset, bool aFill, } bool already_filled = m_Fill == FILLED_WITH_BG_BODYCOLOR; - aPlotter->SetColor( GetLayerColor( LAYER_DEVICE ) ); - aPlotter->Rect( pos, end, already_filled ? NO_FILL : m_Fill, GetPenSize() ); + auto pen_size = GetPenSize(); + + if( !already_filled || pen_size > 0 ) + { + pen_size = std::max( 0, pen_size ); + aPlotter->SetColor( GetLayerColor( LAYER_DEVICE ) ); + aPlotter->Rect( pos, end, already_filled ? NO_FILL : m_Fill, GetPenSize() ); + } }