Update local coords when editing EDGE_MODULEs.

Fixes: lp:1853726
* https://bugs.launchpad.net/kicad/+bug/1853726
This commit is contained in:
Jeff Young 2019-12-02 14:55:00 +00:00
parent 3af3bf894c
commit a9da0c6ecf
1 changed files with 6 additions and 0 deletions

View File

@ -1048,6 +1048,9 @@ int POINT_EDITOR::addCorner( const TOOL_EVENT& aEvent )
// Move the end of the line to the break point..
graphicItem->SetEnd( wxPoint( nearestPoint.x, nearestPoint.y ) );
if( graphicItem->Type() == PCB_MODULE_EDGE_T )
static_cast<EDGE_MODULE*>( graphicItem )->SetLocalCoord();
// and add another one starting from the break point
DRAWSEGMENT* newSegment;
@ -1066,6 +1069,9 @@ int POINT_EDITOR::addCorner( const TOOL_EVENT& aEvent )
newSegment->SetStart( wxPoint( nearestPoint.x, nearestPoint.y ) );
newSegment->SetEnd( wxPoint( seg.B.x, seg.B.y ) );
if( newSegment->Type() == PCB_MODULE_EDGE_T )
static_cast<EDGE_MODULE*>( newSegment )->SetLocalCoord();
commit.Add( newSegment );
commit.Push( _( "Split segment" ) );
}