diff --git a/eeschema/lib_shape.cpp b/eeschema/lib_shape.cpp index 60a1078b63..56353b0466 100644 --- a/eeschema/lib_shape.cpp +++ b/eeschema/lib_shape.cpp @@ -265,7 +265,12 @@ void LIB_SHAPE::print( const RENDER_SETTINGS* aSettings, const VECTOR2I& aOffset CalcArcAngles( t1, t2 ); - if( aTransform.MapAngles( &t1, &t2 ) == ( ( t1 - t2 ).Normalize180() > ANGLE_0 ) ) + // N.B. The order of evaluation is critical here as MapAngles will modify t1, t2 + // and the Normalize routine depends on these modifications for the correct output + bool transformed = aTransform.MapAngles( &t1, &t2 ); + bool transformed2 = ( ( t1 - t2 ).Normalize180() > ANGLE_0 ); + + if( transformed == transformed2 ) std::swap( pt1, pt2 ); }