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

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15313

(cherry picked from commit 6cef504d2d)
This commit is contained in:
Jeff Young 2023-08-05 18:50:12 +01:00
parent 83624acfd2
commit acbddc904b
1 changed files with 3 additions and 3 deletions

View File

@ -835,7 +835,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;
@ -847,7 +847,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 ) )
@ -861,7 +861,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 );