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
This commit is contained in:
parent
11117a2d9a
commit
e4b60b03d1
|
@ -327,6 +327,12 @@ bool DIALOG_GRAPHIC_ITEM_PROPERTIES::TransferDataFromWindow()
|
||||||
m_item->SetBezControl2( wxPoint( m_bezierCtrl2X.GetValue(), m_bezierCtrl2Y.GetValue() ) );
|
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 )
|
if( m_fp_item )
|
||||||
{
|
{
|
||||||
// We are editing a footprint; init the item coordinates relative to the footprint anchor.
|
// 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->SetWidth( m_thickness.GetValue() );
|
||||||
m_item->SetLayer( ToLAYER_ID( layer ) );
|
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() );
|
m_item->RebuildBezierToSegmentsPointsList( m_item->GetWidth() );
|
||||||
|
|
||||||
commit.Push( _( "Modify drawing properties" ) );
|
commit.Push( _( "Modify drawing properties" ) );
|
||||||
|
|
Loading…
Reference in New Issue