pcbnew: Update points before refresh

When removing a point from the polygon, the vertex is removed before it
is tested for validity.  If it fails validation, the edit is reverted
and the point count doesn't change, so the view update only modifies the
existing points.  But the revert may also have changed the shared
pointer to the point array, invalidating the view's copy.

Fixes: lp:1821909
* https://bugs.launchpad.net/kicad/+bug/1821909

(cherry picked from commit 940aef77af)
This commit is contained in:
Seth Hillbrand 2019-03-31 16:06:50 -07:00
parent c75bd89d63
commit 2a5a207148
1 changed files with 1 additions and 0 deletions

View File

@ -1155,6 +1155,7 @@ int POINT_EDITOR::removeCorner( const TOOL_EVENT& aEvent )
}
setEditedPoint( nullptr );
updatePoints();
if( valid )
commit.Push( _( "Remove a zone/polygon corner" ) );