diff --git a/eeschema/sch_shape.cpp b/eeschema/sch_shape.cpp index 136ebf0740..40d847e317 100644 --- a/eeschema/sch_shape.cpp +++ b/eeschema/sch_shape.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include @@ -190,11 +191,19 @@ void SCH_SHAPE::Plot( PLOTTER* aPlotter ) const int SCH_SHAPE::GetPenWidth() const { + if( m_stroke.GetWidth() > 0 ) + return GetWidth(); + // Historically 0 meant "default width" and negative numbers meant "don't stroke". if( GetWidth() < 0 && GetFillMode() != FILL_T::NO_FILL ) return 0; - else - return std::max( GetWidth(), 1 ); + + SCHEMATIC* schematic = Schematic(); + + if( schematic ) + return schematic->Settings().m_DefaultLineWidth; + + return Mils2iu( DEFAULT_LINE_WIDTH_MILS ); }