Schematic: junctions need to be added to the view before cleanup

Otherwise they aren't considered for breaking segments.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15146
This commit is contained in:
Mike Williams 2023-08-03 10:04:36 -04:00
parent 573d2f94de
commit 5b335f1c4e
1 changed files with 2 additions and 1 deletions

View File

@ -847,9 +847,10 @@ int SCH_DRAWING_TOOLS::SingleClickPlace( const TOOL_EVENT& aEvent )
const_cast<KIID&>( newItem->m_Uuid ) = KIID();
newItem->SetPosition( cursorPos );
newItem->SetFlags( IS_NEW );
m_frame->AddToScreen( newItem, screen );
SCH_COMMIT commit( m_toolMgr );
commit.Add( newItem, screen );
commit.Added( newItem, screen );
m_frame->SchematicCleanUp( &commit );