From f7f15e1ddf228f2e3875561ed125d243abd97f65 Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 12 May 2023 03:59:56 +0300 Subject: [PATCH] Prevent axes settings from affecting angles in properties panel. Fixes https://gitlab.com/kicad/code/kicad/issues/14168 --- common/properties/pg_editors.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/properties/pg_editors.cpp b/common/properties/pg_editors.cpp index 001324c918..a2a5ce949f 100644 --- a/common/properties/pg_editors.cpp +++ b/common/properties/pg_editors.cpp @@ -81,9 +81,14 @@ wxPGWindowList PG_UNIT_EDITOR::CreateControls( wxPropertyGrid* aPropGrid, wxPGPr m_unitBinder->SetUnits( m_frame->GetUserUnits() ); if( PGPROPERTY_DISTANCE* prop = dynamic_cast( aProperty ) ) + { m_unitBinder->SetCoordType( prop->CoordType() ); + } else if( dynamic_cast( aProperty ) != nullptr ) + { + m_unitBinder->SetCoordType( ORIGIN_TRANSFORMS::NOT_A_COORD ); m_unitBinder->SetUnits( EDA_UNITS::DEGREES ); + } UpdateControl( aProperty, win );