From 5bed201a2354127b8fb88331209afbe099aa44b7 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sun, 3 May 2020 21:47:27 +0100 Subject: [PATCH] Don't collect connected labels on a paste. Fixes https://gitlab.com/kicad/code/kicad/issues/4311 --- eeschema/tools/sch_move_tool.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/eeschema/tools/sch_move_tool.cpp b/eeschema/tools/sch_move_tool.cpp index 4447c3eaf0..054fdec67c 100644 --- a/eeschema/tools/sch_move_tool.cpp +++ b/eeschema/tools/sch_move_tool.cpp @@ -651,8 +651,11 @@ void SCH_MOVE_TOOL::moveItem( EDA_ITEM* aItem, const VECTOR2I& aDelta ) { SCH_LINE* line = static_cast( aItem ); - if( aItem->HasFlag( STARTPOINT ) || aItem->HasFlag( ENDPOINT ) ) - collectLabels( line ); + if( !aItem->IsNew() ) + { + if( aItem->HasFlag( STARTPOINT ) || aItem->HasFlag( ENDPOINT ) ) + collectLabels( line ); + } if( aItem->HasFlag( STARTPOINT ) ) line->MoveStart( (wxPoint) aDelta ); @@ -660,7 +663,10 @@ void SCH_MOVE_TOOL::moveItem( EDA_ITEM* aItem, const VECTOR2I& aDelta ) if( aItem->HasFlag( ENDPOINT ) ) line->MoveEnd( (wxPoint) aDelta ); - adjustLabels( line ); + if( !aItem->IsNew() ) + { + adjustLabels( line ); + } } break;