Don't update units for UNSCALED, PERCENT or DEGREES.

Fixes https://gitlab.com/kicad/code/kicad/issues/10020

(cherry picked from commit 27d8df1122)
This commit is contained in:
Jeff Young 2021-12-31 23:31:18 +00:00
parent c02cadec2a
commit 0317185860
1 changed files with 8 additions and 3 deletions

View File

@ -115,11 +115,16 @@ void UNIT_BINDER::SetDataType( EDA_DATA_TYPE aDataType )
void UNIT_BINDER::onUnitsChanged( wxCommandEvent& aEvent )
{
int temp = (int) GetValue();
if( m_units != EDA_UNITS::UNSCALED
&& m_units != EDA_UNITS::DEGREES
&& m_units != EDA_UNITS::PERCENT )
{
int temp = (int) GetValue();
SetUnits( m_frame->GetUserUnits() );
SetUnits( m_frame->GetUserUnits() );
SetValue( temp );
SetValue( temp );
}
aEvent.Skip();
}