Don't modify radius when editing center.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17192
(cherry picked from commit 1290228fbf
)
This commit is contained in:
parent
cc75d8c0af
commit
1a932cb13b
|
@ -1991,13 +1991,13 @@ static struct EDA_SHAPE_DESC
|
|||
.SetAvailableFunc( isNotPolygonOrCircle );
|
||||
|
||||
propMgr.AddProperty( new PROPERTY<EDA_SHAPE, int>( _HKI( "Center X" ),
|
||||
&EDA_SHAPE::SetStartX, &EDA_SHAPE::GetStartX, PROPERTY_DISPLAY::PT_COORD,
|
||||
&EDA_SHAPE::SetCenterX, &EDA_SHAPE::GetStartX, PROPERTY_DISPLAY::PT_COORD,
|
||||
ORIGIN_TRANSFORMS::ABS_X_COORD ),
|
||||
shapeProps )
|
||||
.SetAvailableFunc( isCircle );
|
||||
|
||||
propMgr.AddProperty( new PROPERTY<EDA_SHAPE, int>( _HKI( "Center Y" ),
|
||||
&EDA_SHAPE::SetStartY, &EDA_SHAPE::GetStartY, PROPERTY_DISPLAY::PT_COORD,
|
||||
&EDA_SHAPE::SetCenterY, &EDA_SHAPE::GetStartY, PROPERTY_DISPLAY::PT_COORD,
|
||||
ORIGIN_TRANSFORMS::ABS_Y_COORD ),
|
||||
shapeProps )
|
||||
.SetAvailableFunc( isCircle );
|
||||
|
|
|
@ -145,6 +145,18 @@ public:
|
|||
m_endsSwapped = false;
|
||||
}
|
||||
|
||||
void SetCenterY( int y )
|
||||
{
|
||||
m_end.y += y - m_start.y;
|
||||
m_start.y = y;
|
||||
}
|
||||
|
||||
void SetCenterX( int x )
|
||||
{
|
||||
m_end.x += x - m_start.x;
|
||||
m_start.x = x;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the ending point of the graphic.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue