diff --git a/gerbview/dcode.cpp b/gerbview/dcode.cpp index 99610804d0..dc2d589f94 100644 --- a/gerbview/dcode.cpp +++ b/gerbview/dcode.cpp @@ -407,12 +407,10 @@ void D_CODE::ConvertShapeToPolygon() addHoleToPolygon( &m_Polygon, m_DrillShape, m_Drill, initialpos ); - if( m_Rotation ) // vertical oval, rotate polygon. + if( m_Rotation ) // rotate polygonal shape: { - int angle = KiROUND( m_Rotation * 10 ); - - for( auto it = m_Polygon.Iterate( 0 ); it; ++it ) - it->Rotate( -angle ); + double angle = m_Rotation * M_PI / 180; + m_Polygon.Rotate( angle, VECTOR2I( 0, 0 ) ); } break; diff --git a/gerbview/rs274x.cpp b/gerbview/rs274x.cpp index 6f153023dd..61dbde2dfe 100644 --- a/gerbview/rs274x.cpp +++ b/gerbview/rs274x.cpp @@ -824,7 +824,7 @@ bool GERBER_FILE_IMAGE::ExecuteRS274XCommand( int aCommand, char* aBuff, { aText++; dcode->m_Drill.x = KiROUND( ReadDouble( aText ) * conv_scale ); - dcode->m_Drill.y = dcode->m_Drill.x = + dcode->m_Drill.y = dcode->m_Drill.x; dcode->m_DrillShape = APT_DEF_ROUND_HOLE; }