Commit 25f95ec1 authored by jean-pierre charras's avatar jean-pierre charras

Pcbnew: Fix 2 minor bugs about pcb texts: flipped texts have an incorrect rotation angle,

and text dialog editor did not handle properly negative rotation angles values.
parent e6681f17
This diff is collapsed.
......@@ -305,10 +305,7 @@ void TEXTE_PCB::Rotate(const wxPoint& aRotCentre, int aAngle)
{
RotatePoint( &m_Pos, aRotCentre, aAngle );
m_Orient += aAngle;
while( m_Orient >= 3600 )
m_Orient -= 3600;
while( m_Orient < -3600 )
m_Orient += 3600;
NORMALIZE_ANGLE_360( m_Orient );
}
......@@ -320,7 +317,7 @@ void TEXTE_PCB::Rotate(const wxPoint& aRotCentre, int aAngle)
void TEXTE_PCB::Flip(const wxPoint& aCentre )
{
m_Pos.y = aCentre.y - ( m_Pos.y - aCentre.y );
NEGATE( m_Orient );
// NEGATE( m_Orient ); not needed: m_Mirror handles this
if( ( GetLayer() == LAYER_N_BACK ) || ( GetLayer() == LAYER_N_FRONT ) )
{
m_Mirror = not m_Mirror; /* inverse mirror */
......
......@@ -120,12 +120,15 @@ void DIALOG_PCB_TEXT_PROPERTIES::MyInit()
m_OrientationCtrl->SetSelection( 0 );
break;
case 900:
case -2700:
m_OrientationCtrl->SetSelection( 1 );
break;
case 1800:
case -1800:
m_OrientationCtrl->SetSelection( 2 );
break;
case 2700:
case -900:
m_OrientationCtrl->SetSelection( 3 );
break;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment