From e4b60b03d1b4e2a27fb33aa251aad78730670b06 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Thu, 17 Dec 2020 16:32:10 +0100 Subject: [PATCH] fp editor: fix incorrect initialization of arc center when edited by the graphic item properties dialog. The arc center (in local coordinates) was initialized before the actual value was calculated. Fixes #6772 https://gitlab.com/kicad/code/kicad/issues/6772 --- pcbnew/dialogs/dialog_graphic_item_properties.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pcbnew/dialogs/dialog_graphic_item_properties.cpp b/pcbnew/dialogs/dialog_graphic_item_properties.cpp index 29605a007f..46946e1a3c 100644 --- a/pcbnew/dialogs/dialog_graphic_item_properties.cpp +++ b/pcbnew/dialogs/dialog_graphic_item_properties.cpp @@ -327,6 +327,12 @@ bool DIALOG_GRAPHIC_ITEM_PROPERTIES::TransferDataFromWindow() m_item->SetBezControl2( wxPoint( m_bezierCtrl2X.GetValue(), m_bezierCtrl2Y.GetValue() ) ); } + if( m_item->GetShape() == S_ARC ) + { + m_item->SetCenter( GetArcCenter( m_item->GetArcStart(), m_item->GetArcEnd(), m_AngleValue ) ); + m_item->SetAngle( m_AngleValue * 10.0, false ); + } + if( m_fp_item ) { // We are editing a footprint; init the item coordinates relative to the footprint anchor. @@ -344,12 +350,6 @@ bool DIALOG_GRAPHIC_ITEM_PROPERTIES::TransferDataFromWindow() m_item->SetWidth( m_thickness.GetValue() ); m_item->SetLayer( ToLAYER_ID( layer ) ); - if( m_item->GetShape() == S_ARC ) - { - m_item->SetCenter( GetArcCenter( m_item->GetArcStart(), m_item->GetArcEnd(), m_AngleValue ) ); - m_item->SetAngle( m_AngleValue * 10.0, false ); - } - m_item->RebuildBezierToSegmentsPointsList( m_item->GetWidth() ); commit.Push( _( "Modify drawing properties" ) );