From 63b0ef65e0fb755351ff67c864bc60cfd953039d Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Thu, 13 Jul 2023 18:20:01 +0100 Subject: [PATCH] Try both ends to see if one is a wire. Fixes https://gitlab.com/kicad/code/kicad/-/issues/15178 (cherry picked from commit 5f8583cd25ce72f9095c4eb4bf13dddaf3f74763) --- eeschema/tools/sch_move_tool.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/eeschema/tools/sch_move_tool.cpp b/eeschema/tools/sch_move_tool.cpp index 96d3ba015c..94b48498e9 100644 --- a/eeschema/tools/sch_move_tool.cpp +++ b/eeschema/tools/sch_move_tool.cpp @@ -1165,7 +1165,11 @@ void SCH_MOVE_TOOL::getConnectedDragItems( SCH_ITEM* aSelectedItem, const VECTOR newWire->SetFlags( IS_NEW ); newWire->SetConnectivityDirty( true ); - newWire->SetLastResolvedState( selected ); + + if( dynamic_cast( selected ) ) + newWire->SetLastResolvedState( selected ); + else if( dynamic_cast( fixed ) ) + newWire->SetLastResolvedState( fixed ); newWire->SetEndPoint( end ); m_frame->AddToScreen( newWire, m_frame->GetScreen() );