From 0ea156042b9e117cd052a28d0a75e7942974dd7f Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Wed, 1 May 2019 12:56:03 +0100 Subject: [PATCH] Fix over-zealous wire-grabbing for drag. --- eeschema/tools/sch_edit_tool.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eeschema/tools/sch_edit_tool.cpp b/eeschema/tools/sch_edit_tool.cpp index 95b701f850..5504e520c6 100644 --- a/eeschema/tools/sch_edit_tool.cpp +++ b/eeschema/tools/sch_edit_tool.cpp @@ -501,7 +501,8 @@ int SCH_EDIT_TOOL::Main( const TOOL_EVENT& aEvent ) item->ClearFlags( STARTPOINT | ENDPOINT ); } - for( unsigned i = 0; i < selection.GetSize(); ++i ) + int originalEnd = selection.GetSize(); + for( unsigned i = 0; i < originalEnd && i < selection.GetSize(); ++i ) { SCH_ITEM* item = static_cast( selection.GetItem( i ) );