← Back to team overview

kicad-developers team mailing list archive

[PATCH] Fix bug in Eeschema block selector

 

​The attached patch fixes a minor issue in the Eeschema block selector code.

You can demonstrate the issue by placing a ​multi-pin component on your
schematic and then connecting multiple pins with wires.  Next, drag the
component.  Not all wires/junctions connected to your component will drag
(see example images).

The attached patch corrects this issue.

-Seth
From 3933807251db2959ce1c43ea3adbe8db1bf2462c Mon Sep 17 00:00:00 2001
From: Seth Hillbrand <hillbrand@xxxxxxxxxxx>
Date: Wed, 15 Nov 2017 14:12:15 -0800
Subject: [PATCH] Eeschema: Fix bug in block selector

The block selector needs to add all connected items
to the block.  Lines marked skip should not affect
the next item tested.
---
 eeschema/sch_screen.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eeschema/sch_screen.cpp b/eeschema/sch_screen.cpp
index eb64746a6..a6c138930 100644
--- a/eeschema/sch_screen.cpp
+++ b/eeschema/sch_screen.cpp
@@ -832,10 +832,10 @@ void SCH_SCREEN::addConnectedItemsToBlock( const wxPoint& position )
 {
     SCH_ITEM* item;
     ITEM_PICKER picker;
-    bool addinlist = true;
 
     for( item = m_drawList.begin(); item; item = item->Next() )
     {
+        bool addinlist = true;
         picker.SetItem( item );
 
         if( !item->IsConnectable() || !item->IsConnected( position )
-- 
2.11.0

Attachment: middle.png
Description: PNG image

Attachment: after.png
Description: PNG image

Attachment: before.png
Description: PNG image


Follow ups