From 353bda6792c5af26b98adf3ab3d040fc476c3777 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Thu, 10 Jan 2019 17:28:29 -0800 Subject: [PATCH] eeschema: Add directly connected items to block Allow components to connect to both components and junctions Fixes: lp:1798968 * https://bugs.launchpad.net/kicad/+bug/1798968 --- eeschema/sch_component.h | 3 ++- eeschema/sch_junction.h | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/eeschema/sch_component.h b/eeschema/sch_component.h index e935c01f9a..5219821bca 100644 --- a/eeschema/sch_component.h +++ b/eeschema/sch_component.h @@ -599,7 +599,8 @@ public: { return ( aItem->Type() == SCH_LINE_T && aItem->GetLayer() == LAYER_WIRE ) || ( aItem->Type() == SCH_NO_CONNECT_T ) || - ( aItem->Type() == SCH_JUNCTION_T ); + ( aItem->Type() == SCH_JUNCTION_T ) || + ( aItem->Type() == SCH_COMPONENT_T ) ; } /** diff --git a/eeschema/sch_junction.h b/eeschema/sch_junction.h index 5300d964a8..05391fe628 100644 --- a/eeschema/sch_junction.h +++ b/eeschema/sch_junction.h @@ -87,8 +87,9 @@ public: bool CanConnect( const SCH_ITEM* aItem ) const override { - return aItem->Type() == SCH_LINE_T && - ( aItem->GetLayer() == LAYER_WIRE || aItem->GetLayer() == LAYER_BUS ); + return ( aItem->Type() == SCH_LINE_T && + ( aItem->GetLayer() == LAYER_WIRE || aItem->GetLayer() == LAYER_BUS ) ) || + aItem->Type() == SCH_COMPONENT_T; } wxString GetSelectMenuText( EDA_UNITS_T aUnits ) const override