Update local coords when editing EDGE_MODULEs.
Fixes: lp:1853726 * https://bugs.launchpad.net/kicad/+bug/1853726
This commit is contained in:
parent
3af3bf894c
commit
a9da0c6ecf
|
@ -1048,6 +1048,9 @@ int POINT_EDITOR::addCorner( const TOOL_EVENT& aEvent )
|
||||||
// Move the end of the line to the break point..
|
// Move the end of the line to the break point..
|
||||||
graphicItem->SetEnd( wxPoint( nearestPoint.x, nearestPoint.y ) );
|
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
|
// and add another one starting from the break point
|
||||||
DRAWSEGMENT* newSegment;
|
DRAWSEGMENT* newSegment;
|
||||||
|
|
||||||
|
@ -1066,6 +1069,9 @@ int POINT_EDITOR::addCorner( const TOOL_EVENT& aEvent )
|
||||||
newSegment->SetStart( wxPoint( nearestPoint.x, nearestPoint.y ) );
|
newSegment->SetStart( wxPoint( nearestPoint.x, nearestPoint.y ) );
|
||||||
newSegment->SetEnd( wxPoint( seg.B.x, seg.B.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.Add( newSegment );
|
||||||
commit.Push( _( "Split segment" ) );
|
commit.Push( _( "Split segment" ) );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue