From 2a5a207148a3c7e24d7408d5242edef1bb323e1a Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Sun, 31 Mar 2019 16:06:50 -0700 Subject: [PATCH] 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 940aef77afa88fe360baf5204dd0b688dd573409) --- pcbnew/tools/point_editor.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/pcbnew/tools/point_editor.cpp b/pcbnew/tools/point_editor.cpp index 5239ca9fe6..2b06c4a4e7 100644 --- a/pcbnew/tools/point_editor.cpp +++ b/pcbnew/tools/point_editor.cpp @@ -1155,6 +1155,7 @@ int POINT_EDITOR::removeCorner( const TOOL_EVENT& aEvent ) } setEditedPoint( nullptr ); + updatePoints(); if( valid ) commit.Push( _( "Remove a zone/polygon corner" ) );