Browse Source

Eeschema: ensure wire / bus auto-start respects bus labels

Fixes #13506 and further ensures correct behaviour for heirarchical labels and sheet pins
7.0
James Jackson 3 years ago
committed by JamesJCode
parent
commit
661eed7fed
  1. 10
      eeschema/tools/ee_selection_tool.cpp

10
eeschema/tools/ee_selection_tool.cpp

@ -731,6 +731,16 @@ OPT_TOOL_EVENT EE_SELECTION_TOOL::autostartEvent( TOOL_EVENT* aEvent, EE_GRID_HE
else if( line->IsGraphicLine() )
newEvt = EE_ACTIONS::drawLines.MakeEvent();
}
else if( aItem->Type() == SCH_LABEL_T || aItem->Type() == SCH_HIER_LABEL_T
|| aItem->Type() == SCH_SHEET_PIN_T )
{
SCH_LABEL_BASE* label = static_cast<SCH_LABEL_BASE*>( aItem );
SCH_CONNECTION possibleConnection( label->Schematic()->ConnectionGraph() );
possibleConnection.ConfigureFromLabel( label->GetText() );
if( possibleConnection.IsBus() )
newEvt = EE_ACTIONS::drawBus.MakeEvent();
}
newEvt->SetMousePosition( pos );
newEvt->SetHasPosition( true );

Loading…
Cancel
Save