Update local coords when editing EDGE_MODULEs.
Fixes: lp:1853726 * https://bugs.launchpad.net/kicad/+bug/1853726
This commit is contained in:
parent
5c056c2a3e
commit
c6eff4d373
|
@ -1054,6 +1054,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;
|
||||
|
||||
|
@ -1072,6 +1075,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" ) );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue