diff --git a/eeschema/sch_painter.cpp b/eeschema/sch_painter.cpp index c77ef7d3ce..f44050f16c 100644 --- a/eeschema/sch_painter.cpp +++ b/eeschema/sch_painter.cpp @@ -1326,7 +1326,12 @@ void SCH_PAINTER::draw( const SCH_LINE *aLine, int aLayer ) STROKE_PARAMS::Stroke( &line, lineStyle, width, &m_schSettings, [&]( const VECTOR2I& a, const VECTOR2I& b ) { - m_gal->DrawLine( a, b ); + // DrawLine has problem with 0 length lines + // so draw a line with a minimal length + if( a == b ) + m_gal->DrawLine( a+1, b ); + else + m_gal->DrawLine( a, b ); } ); } } @@ -1429,7 +1434,12 @@ void SCH_PAINTER::draw( const SCH_SHAPE* aShape, int aLayer ) STROKE_PARAMS::Stroke( shape, lineStyle, lineWidth, &m_schSettings, [&]( const VECTOR2I& a, const VECTOR2I& b ) { - m_gal->DrawLine( a, b ); + // DrawLine has problem with 0 length lines + // so draw a line with a minimal length + if( a == b ) + m_gal->DrawLine( a+1, b ); + else + m_gal->DrawLine( a, b ); } ); }