From 2a856890e6f99f5ee1e0433f63e19956f8fdcdba Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Wed, 12 May 2021 00:06:52 +0100 Subject: [PATCH] Allow connections between sheet (pins) and symbols. Fixes https://gitlab.com/kicad/code/kicad/issues/8305 --- eeschema/sch_sheet.h | 7 ++++--- eeschema/tools/sch_move_tool.cpp | 4 ---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/eeschema/sch_sheet.h b/eeschema/sch_sheet.h index f8c3fbdcef..88f1212e3f 100644 --- a/eeschema/sch_sheet.h +++ b/eeschema/sch_sheet.h @@ -354,9 +354,10 @@ public: bool CanConnect( const SCH_ITEM* aItem ) const override { - return ( aItem->Type() == SCH_LINE_T && aItem->GetLayer() == LAYER_WIRE ) || - ( aItem->Type() == SCH_LINE_T && aItem->GetLayer() == LAYER_BUS ) || - ( aItem->Type() == SCH_NO_CONNECT_T ); + return ( aItem->Type() == SCH_LINE_T && aItem->GetLayer() == LAYER_WIRE ) + || ( aItem->Type() == SCH_LINE_T && aItem->GetLayer() == LAYER_BUS ) + || ( aItem->Type() == SCH_NO_CONNECT_T ) + || ( aItem->Type() == SCH_COMPONENT_T ); } std::vector GetConnectionPoints() const override; diff --git a/eeschema/tools/sch_move_tool.cpp b/eeschema/tools/sch_move_tool.cpp index e52af5438c..0cd64246d8 100644 --- a/eeschema/tools/sch_move_tool.cpp +++ b/eeschema/tools/sch_move_tool.cpp @@ -594,10 +594,6 @@ void SCH_MOVE_TOOL::getConnectedDragItems( SCH_ITEM* aOriginalItem, wxPoint aPoi } case SCH_SHEET_T: - // Dragging a sheet just because it's connected to something else feels a bit like - // the tail wagging the dog, but this could be moved down to the next case. - break; - case SCH_COMPONENT_T: case SCH_JUNCTION_T: if( test->IsConnected( aPoint ) )