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:
parent
c75bd89d63
commit
2a5a207148
|
@ -1155,6 +1155,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