Don't allow setting a pad width or height of 0.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14278
This commit is contained in:
Jeff Young 2023-05-31 23:41:24 +01:00
parent c7730eae3f
commit ddd2cb005b
1 changed files with 2 additions and 2 deletions

View File

@ -246,9 +246,9 @@ public:
void SetSize( const VECTOR2I& aSize ) { m_size = aSize; SetDirty(); } void SetSize( const VECTOR2I& aSize ) { m_size = aSize; SetDirty(); }
const VECTOR2I& GetSize() const { return m_size; } const VECTOR2I& GetSize() const { return m_size; }
void SetSizeX( const int aX ) { m_size.x = aX; SetDirty(); } void SetSizeX( const int aX ) { if( aX > 0 ) { m_size.x = aX; SetDirty(); } }
int GetSizeX() const { return m_size.x; } int GetSizeX() const { return m_size.x; }
void SetSizeY( const int aY ) { m_size.y = aY; SetDirty(); } void SetSizeY( const int aY ) { if( aY > 0 ) { m_size.y = aY; SetDirty(); } }
int GetSizeY() const { return m_size.y; } int GetSizeY() const { return m_size.y; }
void SetDelta( const VECTOR2I& aSize ) { m_deltaSize = aSize; SetDirty(); } void SetDelta( const VECTOR2I& aSize ) { m_deltaSize = aSize; SetDirty(); }