Browse Source

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).
7.0
Jeff Young 4 years ago
parent
commit
af20d46d06
  1. 2
      libs/kimath/include/geometry/eda_angle.h
  2. 2
      pcbnew/dialogs/panel_edit_options.cpp
  3. 3
      pcbnew/footprint_editor_settings.cpp
  4. 3
      pcbnew/pcbnew_settings.cpp

2
libs/kimath/include/geometry/eda_angle.h

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

2
pcbnew/dialogs/panel_edit_options.cpp

@ -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 );

3
pcbnew/footprint_editor_settings.cpp

@ -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 ) );

3
pcbnew/pcbnew_settings.cpp

@ -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 ) );

Loading…
Cancel
Save