diff --git a/pcbnew/dialogs/dialog_pad_basicshapes_properties.cpp b/pcbnew/dialogs/dialog_pad_basicshapes_properties.cpp index cec69eb246..b5564ba787 100644 --- a/pcbnew/dialogs/dialog_pad_basicshapes_properties.cpp +++ b/pcbnew/dialogs/dialog_pad_basicshapes_properties.cpp @@ -577,22 +577,12 @@ DIALOG_PAD_PRIMITIVES_TRANSFORM::DIALOG_PAD_PRIMITIVES_TRANSFORM( wxWindow* aPar } -// A helper function in geometry transform -inline void geom_transf( VECTOR2I& aCoord, const VECTOR2I& aMove, double aScale, double aRotation ) -{ - aCoord.x = KiROUND( aCoord.x * aScale ); - aCoord.y = KiROUND( aCoord.y * aScale ); - aCoord += aMove; - RotatePoint( aCoord, aRotation ); -} - - void DIALOG_PAD_PRIMITIVES_TRANSFORM::Transform( std::vector>* aList, int aDuplicateCount ) { - wxPoint move_vect( m_vectorX.GetValue(), m_vectorY.GetValue() ); - double rotation = m_rotation.GetValue(); - double scale = DoubleValueFromString( EDA_UNITS::UNSCALED, m_scaleCtrl->GetValue() ); + VECTOR2I move_vect( m_vectorX.GetValue(), m_vectorY.GetValue() ); + EDA_ANGLE rotation = m_rotation.GetAngleValue(); + double scale = DoubleValueFromString( EDA_UNITS::UNSCALED, m_scaleCtrl->GetValue() ); // Avoid too small / too large scale, which could create issues: if( scale < 0.01 ) @@ -606,8 +596,8 @@ void DIALOG_PAD_PRIMITIVES_TRANSFORM::Transform( std::vectorMove( currMoveVect ); shape->Scale( scale ); - shape->Rotate( VECTOR2I( 0, 0 ), EDA_ANGLE( curr_rotation, TENTHS_OF_A_DEGREE_T ) ); + shape->Rotate( VECTOR2I( 0, 0 ), curr_rotation ); } // Prepare new transform on duplication: