Fixup issue with adding junctions

Segfault when we pass a component to the routine as it expects to see a
selection.
This commit is contained in:
Seth Hillbrand 2019-11-26 23:13:01 -08:00
parent 9f9b48739c
commit ffcf3b01fc
1 changed files with 4 additions and 1 deletions

View File

@ -191,7 +191,10 @@ int SCH_DRAWING_TOOLS::PlaceComponent( const TOOL_EVENT& aEvent )
m_view->ClearPreview();
m_frame->AddItemToScreenAndUndoList( component );
m_toolMgr->RunAction( EE_ACTIONS::addNeededJunctions, true, component );
EE_SELECTION new_sel;
new_sel.Add( component );
m_toolMgr->RunAction( EE_ACTIONS::addNeededJunctions, true, &new_sel );
m_frame->OnModify();
if( m_frame->GetUseAllUnits() || m_frame->GetRepeatComponent() )