From d770284fa28a381ce390ed23fe2de58753228b7a Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sat, 23 Jan 2021 16:45:36 +0000 Subject: [PATCH] Add a bus instead of a wire for bus junctions. Fixes https://gitlab.com/kicad/code/kicad/issues/7231 --- eeschema/tools/sch_move_tool.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/eeschema/tools/sch_move_tool.cpp b/eeschema/tools/sch_move_tool.cpp index c3b7390ee1..8685044b0a 100644 --- a/eeschema/tools/sch_move_tool.cpp +++ b/eeschema/tools/sch_move_tool.cpp @@ -602,7 +602,13 @@ void SCH_MOVE_TOOL::getConnectedDragItems( SCH_ITEM* aOriginalItem, wxPoint aPoi { // Add a new wire between the component or junction and the selected item so // the selected item can be dragged. - SCH_LINE* newWire = new SCH_LINE( aPoint, LAYER_WIRE ); + SCH_LINE* newWire = nullptr; + + if( test->GetLayer() == LAYER_BUS_JUNCTION ) + newWire = new SCH_LINE( aPoint, LAYER_BUS ); + else + newWire = new SCH_LINE( aPoint, LAYER_WIRE ); + newWire->SetFlags( IS_NEW ); m_frame->AddToScreen( newWire, m_frame->GetScreen() );