Change rotation command to only impact dimension text

This commit is contained in:
Jon Evans 2020-09-11 20:45:36 -04:00
parent 0e9997d9ca
commit 30a428677f
1 changed files with 2 additions and 9 deletions

View File

@ -217,23 +217,16 @@ void DIMENSION::Move( const wxPoint& offset )
void DIMENSION::Rotate( const wxPoint& aRotCentre, double aAngle )
{
wxPoint tmp = m_text.GetTextPos();
RotatePoint( &tmp, aRotCentre, aAngle );
m_text.SetTextPos( tmp );
if( m_keepTextAligned )
m_keepTextAligned = false;
double newAngle = m_text.GetTextAngle() + aAngle;
if( newAngle >= 3600 )
newAngle -= 3600;
if( newAngle > 900 && newAngle < 2700 )
newAngle -= 1800;
m_text.SetTextAngle( newAngle );
RotatePoint( &m_start, aRotCentre, aAngle );
RotatePoint( &m_end, aRotCentre, aAngle );
Update();
}