From acbddc904b0d401e27ed1955ea5af885dca9cdd5 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sat, 5 Aug 2023 18:50:12 +0100 Subject: [PATCH] Don't consider newly-added labels when looking for terminal items. Fixes https://gitlab.com/kicad/code/kicad/-/issues/15313 (cherry picked from commit 6cef504d2d7c3b9e12c892597b0fa9488674d61e) --- eeschema/sch_screen.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eeschema/sch_screen.cpp b/eeschema/sch_screen.cpp index 29bdc420df..0815f0bdaf 100644 --- a/eeschema/sch_screen.cpp +++ b/eeschema/sch_screen.cpp @@ -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 );