Fix incompatibility with old rubber-band wire algo and new ortho wire drag alog.

Fixes https://gitlab.com/kicad/code/kicad/issues/11948
This commit is contained in:
Jeff Young 2022-10-03 22:11:30 +01:00
parent c6284f4835
commit 7bb0275d3c
1 changed files with 6 additions and 0 deletions

View File

@ -1116,6 +1116,12 @@ void SCH_MOVE_TOOL::getConnectedDragItems( SCH_ITEM* aOriginalItem, const VECTOR
newWire->SetFlags( SELECTED_BY_DRAG | STARTPOINT );
aList.push_back( newWire );
if( aPoint != line->GetStartPoint() && aPoint != line->GetEndPoint() )
{
newWire->SetEndPoint( line->GetEndPoint() );
line->SetEndPoint( aPoint );
}
// We need to add a connection reference here because the normal algorithm
// won't find a new line with a point in the middle of an existing line
m_lineConnectionCache[newWire] = { line };