Prevent axes settings from affecting angles in properties panel.

Fixes https://gitlab.com/kicad/code/kicad/issues/14168
This commit is contained in:
Alex 2023-05-12 03:59:56 +03:00
parent efbd360440
commit f7f15e1ddf
1 changed files with 5 additions and 0 deletions

View File

@ -81,9 +81,14 @@ wxPGWindowList PG_UNIT_EDITOR::CreateControls( wxPropertyGrid* aPropGrid, wxPGPr
m_unitBinder->SetUnits( m_frame->GetUserUnits() );
if( PGPROPERTY_DISTANCE* prop = dynamic_cast<PGPROPERTY_DISTANCE*>( aProperty ) )
{
m_unitBinder->SetCoordType( prop->CoordType() );
}
else if( dynamic_cast<PGPROPERTY_ANGLE*>( aProperty ) != nullptr )
{
m_unitBinder->SetCoordType( ORIGIN_TRANSFORMS::NOT_A_COORD );
m_unitBinder->SetUnits( EDA_UNITS::DEGREES );
}
UpdateControl( aProperty, win );