Don't remove last point in libedit

SHAPE_LINE_CHAIN in libedit doesn't make a polygon, so we always need
the last point and it shouldn't be closed

Fixes https://gitlab.com/kicad/code/kicad/issues/9934
This commit is contained in:
Seth Hillbrand 2022-01-05 15:59:58 -08:00
parent 444801ada6
commit 55087a9e82
1 changed files with 5 additions and 1 deletions

View File

@ -74,7 +74,11 @@ public:
void BeginEdit( const wxPoint& aStartPoint ) override { beginEdit( aStartPoint ); }
bool ContinueEdit( const wxPoint& aPosition ) override { return continueEdit( aPosition ); }
void CalcEdit( const wxPoint& aPosition ) override { calcEdit( aPosition ); }
void EndEdit() override { endEdit(); }
/**
* The base EndEdit() removes the last point in the polyline, so don't call that here
*/
void EndEdit() override { }
void SetEditState( int aState ) { setEditState( aState ); }
void AddPoint( const wxPoint& aPosition );