From f6994702aa616c311d9016236aa546fd408f4264 Mon Sep 17 00:00:00 2001 From: Alex Shvartzkop Date: Sat, 22 Jun 2024 06:16:56 +0300 Subject: [PATCH] Fix arc edit points ordering in schematic. Fixes https://gitlab.com/kicad/code/kicad/-/issues/18254 --- eeschema/tools/ee_point_editor.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/eeschema/tools/ee_point_editor.cpp b/eeschema/tools/ee_point_editor.cpp index 576070ff22..c71b9aabd1 100644 --- a/eeschema/tools/ee_point_editor.cpp +++ b/eeschema/tools/ee_point_editor.cpp @@ -115,9 +115,9 @@ public: switch( shape->GetShape() ) { case SHAPE_T::ARC: - points->AddPoint( shape->GetPosition() ); points->AddPoint( shape->GetStart() ); points->AddPoint( shape->GetEnd() ); + points->AddPoint( shape->GetPosition() ); break; case SHAPE_T::CIRCLE: @@ -649,12 +649,7 @@ void EE_POINT_EDITOR::updateParentItem( bool aSnapToGrid ) const switch( shape->GetShape() ) { case SHAPE_T::ARC: - if( getEditedPointIndex() == ARC_CENTER ) - { - shape->SetEditState( 4 ); - shape->CalcEdit( m_editPoints->Point( ARC_CENTER ).GetPosition() ); - } - else if( getEditedPointIndex() == ARC_START ) + if( getEditedPointIndex() == ARC_START ) { shape->SetEditState( 2 ); shape->CalcEdit( m_editPoints->Point( ARC_START ).GetPosition() ); @@ -664,6 +659,11 @@ void EE_POINT_EDITOR::updateParentItem( bool aSnapToGrid ) const shape->SetEditState( 3 ); shape->CalcEdit( m_editPoints->Point( ARC_END ).GetPosition() ); } + else if( getEditedPointIndex() == ARC_CENTER ) + { + shape->SetEditState( 4 ); + shape->CalcEdit( m_editPoints->Point( ARC_CENTER ).GetPosition() ); + } break; case SHAPE_T::CIRCLE: @@ -994,9 +994,9 @@ void EE_POINT_EDITOR::updatePoints() switch( shape->GetShape() ) { case SHAPE_T::ARC: - m_editPoints->Point( ARC_CENTER ).SetPosition( shape->GetPosition() ); m_editPoints->Point( ARC_START ).SetPosition( shape->GetStart() ); m_editPoints->Point( ARC_END ).SetPosition( shape->GetEnd() ); + m_editPoints->Point( ARC_CENTER ).SetPosition( shape->GetPosition() ); break; case SHAPE_T::CIRCLE: