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

Fixes https://gitlab.com/kicad/code/kicad/issues/10020
This commit is contained in:
Jeff Young 2021-12-31 23:31:18 +00:00
parent dc2e93cd0f
commit 27d8df1122
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 )
{
if( m_units != EDA_UNITS::UNSCALED
&& m_units != EDA_UNITS::DEGREES
&& m_units != EDA_UNITS::PERCENT )
{
int temp = (int) GetValue();
SetUnits( m_frame->GetUserUnits() );
SetValue( temp );
}
aEvent.Skip();
}