From e85701f405583f8760ad2bdd12aaf993fc814605 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sat, 28 Dec 2019 00:29:41 +0000 Subject: [PATCH] Don't allow IS_NEW flag on created-line-segments to fool us. When dragging we'll create new line segments between selection-edge objects and things outside the selection that they're attached to. These new lines have their IS_NEW flags set, but shouldn't fool us into thinking that the selection contains pasted (or placed) items. --- eeschema/tools/sch_move_tool.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eeschema/tools/sch_move_tool.cpp b/eeschema/tools/sch_move_tool.cpp index 7bb3836c23..57a4c108f8 100644 --- a/eeschema/tools/sch_move_tool.cpp +++ b/eeschema/tools/sch_move_tool.cpp @@ -179,6 +179,7 @@ int SCH_MOVE_TOOL::Main( const TOOL_EVENT& aEvent ) { SCH_ITEM* sch_item = (SCH_ITEM*) selection.Front(); bool appendUndo = sch_item && sch_item->IsNew(); + bool placingNewItems = sch_item->IsNew(); //------------------------------------------------------------------------ // Setup a drag or a move @@ -268,7 +269,7 @@ int SCH_MOVE_TOOL::Main( const TOOL_EVENT& aEvent ) { wxASSERT_MSG( m_anchorPos, "Should be already set from previous cmd" ); } - else if( selection.Front()->HasFlag( IS_NEW ) ) + else if( placingNewItems ) { m_anchorPos = selection.GetReferencePoint(); }