From bd5d10cd7b20a2f69011a307dc535f205adeff09 Mon Sep 17 00:00:00 2001 From: Mike Williams Date: Wed, 4 Jan 2023 11:02:00 -0500 Subject: [PATCH] Schematic: remove more extraneous dangling symbols --- eeschema/sch_painter.cpp | 14 ++++++-------- eeschema/tools/sch_move_tool.cpp | 8 -------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/eeschema/sch_painter.cpp b/eeschema/sch_painter.cpp index 25a2a3add5..32145ca7f3 100644 --- a/eeschema/sch_painter.cpp +++ b/eeschema/sch_painter.cpp @@ -1687,11 +1687,10 @@ void SCH_PAINTER::draw( const SCH_LINE *aLine, int aLayer ) float width = getLineWidth( aLine, drawingShadows ); PLOT_DASH_TYPE lineStyle = aLine->GetEffectiveLineStyle(); - if( drawingDangling || drawingShadows ) + if( ( drawingDangling || drawingShadows ) && !aLine->IsNew() ) { if( ( aLine->IsWire() && aLine->IsStartDangling() ) - || ( drawingShadows && aLine->IsSelected() && !aLine->IsNew() - && !aLine->HasFlag( STARTPOINT ) ) ) + || ( drawingShadows && aLine->IsSelected() && !aLine->HasFlag( STARTPOINT ) ) ) { COLOR4D danglingColor = ( drawingShadows && !aLine->HasFlag( STARTPOINT ) ) ? color.Inverted() : color; @@ -1702,8 +1701,7 @@ void SCH_PAINTER::draw( const SCH_LINE *aLine, int aLayer ) } if( ( aLine->IsWire() && aLine->IsEndDangling() ) - || ( drawingShadows && aLine->IsSelected() && !aLine->IsNew() - && !aLine->HasFlag( ENDPOINT ) ) ) + || ( drawingShadows && aLine->IsSelected() && !aLine->HasFlag( ENDPOINT ) ) ) { COLOR4D danglingColor = ( drawingShadows && !aLine->HasFlag( ENDPOINT ) ) ? color.Inverted() : color; @@ -1712,11 +1710,11 @@ void SCH_PAINTER::draw( const SCH_LINE *aLine, int aLayer ) aLine->IsWire() && aLine->IsEndDangling(), drawingShadows, aLine->IsBrightened() ); } - - if( drawingDangling ) - return; } + if( drawingDangling ) + return; + m_gal->SetIsStroke( true ); m_gal->SetStrokeColor( color ); m_gal->SetLineWidth( width ); diff --git a/eeschema/tools/sch_move_tool.cpp b/eeschema/tools/sch_move_tool.cpp index 9dbd1822fb..875cbd232c 100644 --- a/eeschema/tools/sch_move_tool.cpp +++ b/eeschema/tools/sch_move_tool.cpp @@ -322,14 +322,6 @@ void SCH_MOVE_TOOL::orthoLineDrag( SCH_LINE* line, const VECTOR2I& splitDelta, i splitDelta.y ? splitDelta.y : yMove ) ); } - // Update the dangling state of our original line to not show a dangling - // end since it is now connected. This doesn't effect anything but is more - // consistent visually - std::vector endPoints; - b->GetEndPoints( endPoints ); - line->UpdateDanglingState( endPoints ); - updateItem( line, true ); - // Update our cache of the connected items. First, attach our drag labels to the line // left behind. for( EDA_ITEM* candidate : m_lineConnectionCache[line] )