diff --git a/common/eda_shape.cpp b/common/eda_shape.cpp index 95eb1e128e..ae75beeace 100644 --- a/common/eda_shape.cpp +++ b/common/eda_shape.cpp @@ -1990,13 +1990,13 @@ static struct EDA_SHAPE_DESC .SetAvailableFunc( isNotPolygonOrCircle ); propMgr.AddProperty( new PROPERTY( _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( _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 ); diff --git a/include/eda_shape.h b/include/eda_shape.h index 15d57b50cf..74de5ddf40 100644 --- a/include/eda_shape.h +++ b/include/eda_shape.h @@ -144,6 +144,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. */