Prevent axes settings from affecting angles in properties panel.

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


(cherry picked from commit f7f15e1ddf)
This commit is contained in:
Alex 2023-05-12 03:59:56 +03:00 committed by dsa-t
parent c3ee1111f9
commit d5661c24bd
1 changed files with 5 additions and 0 deletions

View File

@ -73,9 +73,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 );