Add a bus instead of a wire for bus junctions.

Fixes https://gitlab.com/kicad/code/kicad/issues/7231
This commit is contained in:
Jeff Young 2021-01-23 16:45:36 +00:00
parent 7a8a099259
commit d770284fa2
1 changed files with 7 additions and 1 deletions

View File

@ -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 // Add a new wire between the component or junction and the selected item so
// the selected item can be dragged. // 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 ); newWire->SetFlags( IS_NEW );
m_frame->AddToScreen( newWire, m_frame->GetScreen() ); m_frame->AddToScreen( newWire, m_frame->GetScreen() );