Don't drag both ends after Break Wire.

Fixes https://gitlab.com/kicad/code/kicad/issues/11915
This commit is contained in:
Jeff Young 2022-07-08 23:03:23 -06:00
parent 0953395c87
commit 70aec5d576
1 changed files with 7 additions and 4 deletions

View File

@ -1899,13 +1899,16 @@ int SCH_EDIT_TOOL::BreakWire( const TOOL_EVENT& aEvent )
m_frame->StartNewUndo();
for( SCH_LINE* line : lines )
{
m_frame->BreakSegment( line, cursorPos );
VECTOR2I v = line->GetEndPoint() - line->GetStartPoint();
v = v.Resize( v.EuclideanNorm() - 10 );
line->SetEndPoint( line->GetStartPoint() + v );
}
if( !lines.empty() )
{
if( m_frame->GetScreen()->IsExplicitJunctionNeeded( cursorPos ) )
m_frame->AddJunction( m_frame->GetScreen(), cursorPos, true, false );
m_frame->TestDanglingEnds();
m_frame->OnModify();