Fix converting angles from tenths of a degree.

(Conversion was upside-down.)

Also fixes bugs with rotation angle increment not getting units
set and with a 0 footprint editor value overwriting a non-zero
pcb editor value (or vice versa).
This commit is contained in:
Jeff Young 2022-01-19 19:17:14 +00:00
parent 980fd00933
commit af20d46d06
4 changed files with 7 additions and 3 deletions

View File

@ -52,7 +52,7 @@ public:
break;
case TENTHS_OF_A_DEGREE_T:
m_value = aValue * 10.0;
m_value = aValue / 10.0;
break;
default:

View File

@ -42,6 +42,8 @@ PANEL_EDIT_OPTIONS::PANEL_EDIT_OPTIONS( wxWindow* aParent, EDA_BASE_FRAME* aUnit
m_flipLeftRight->Show( !m_isFootprintEditor );
m_allowFreePads->Show( !m_isFootprintEditor );
m_rotationAngle.SetUnits( EDA_UNITS::DEGREES );
#ifdef __WXOSX_MAC__
m_mouseCmdsOSX->Show( true );
m_mouseCmdsWinLin->Show( false );

View File

@ -93,7 +93,8 @@ FOOTPRINT_EDITOR_SETTINGS::FOOTPRINT_EDITOR_SETTINGS() :
},
[this] ( int aVal )
{
m_RotationAngle = EDA_ANGLE( aVal, TENTHS_OF_A_DEGREE_T );
if( aVal )
m_RotationAngle = EDA_ANGLE( aVal, TENTHS_OF_A_DEGREE_T );
},
900 ) );

View File

@ -139,7 +139,8 @@ PCBNEW_SETTINGS::PCBNEW_SETTINGS()
},
[this] ( int aVal )
{
m_RotationAngle = EDA_ANGLE( aVal, TENTHS_OF_A_DEGREE_T );
if( aVal )
m_RotationAngle = EDA_ANGLE( aVal, TENTHS_OF_A_DEGREE_T );
},
900 ) );