Eeschema: ensure wire / bus auto-start respects bus labels
Fixes #13506 and further ensures correct behaviour for heirarchical labels and sheet pins
This commit is contained in:
parent
e9da3e5ae9
commit
661eed7fed
|
@ -731,6 +731,16 @@ OPT_TOOL_EVENT EE_SELECTION_TOOL::autostartEvent( TOOL_EVENT* aEvent, EE_GRID_HE
|
||||||
else if( line->IsGraphicLine() )
|
else if( line->IsGraphicLine() )
|
||||||
newEvt = EE_ACTIONS::drawLines.MakeEvent();
|
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->SetMousePosition( pos );
|
||||||
newEvt->SetHasPosition( true );
|
newEvt->SetHasPosition( true );
|
||||||
|
|
Loading…
Reference in New Issue