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
This commit is contained in:
parent
32e82f8d87
commit
940aef77af
|
@ -1165,6 +1165,7 @@ int POINT_EDITOR::removeCorner( const TOOL_EVENT& aEvent )
|
||||||
}
|
}
|
||||||
|
|
||||||
setEditedPoint( nullptr );
|
setEditedPoint( nullptr );
|
||||||
|
updatePoints();
|
||||||
|
|
||||||
if( valid )
|
if( valid )
|
||||||
commit.Push( _( "Remove a zone/polygon corner" ) );
|
commit.Push( _( "Remove a zone/polygon corner" ) );
|
||||||
|
|
Loading…
Reference in New Issue