Don't consider newly-added labels when looking for terminal items.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15313
This commit is contained in:
Jeff Young 2023-08-05 18:50:12 +01:00
parent f18feb2a46
commit 6cef504d2d
1 changed files with 3 additions and 3 deletions

View File

@ -847,7 +847,7 @@ bool SCH_SCREEN::IsTerminalPoint( const VECTOR2I& aPosition, int aLayer ) const
label = GetLabel( aPosition );
if( label && label->IsConnected( aPosition ) )
if( label && !label->IsNew() && label->IsConnected( aPosition ) )
return true;
break;
@ -859,7 +859,7 @@ bool SCH_SCREEN::IsTerminalPoint( const VECTOR2I& aPosition, int aLayer ) const
break;
case LAYER_WIRE:
if( GetItem( aPosition, 1, SCH_BUS_WIRE_ENTRY_T) )
if( GetItem( aPosition, 1, SCH_BUS_WIRE_ENTRY_T ) )
return true;
if( GetItem( aPosition, 1, SCH_JUNCTION_T ) )
@ -873,7 +873,7 @@ bool SCH_SCREEN::IsTerminalPoint( const VECTOR2I& aPosition, int aLayer ) const
label = GetLabel( aPosition, 1 );
if( label && label->IsConnected( aPosition ) )
if( label && !label->IsNew() && label->IsConnected( aPosition ) )
return true;
sheetPin = GetSheetPin( aPosition );