diff --git a/eeschema/tools/sch_edit_tool.cpp b/eeschema/tools/sch_edit_tool.cpp index 94d4a529a8..99a616f0a1 100644 --- a/eeschema/tools/sch_edit_tool.cpp +++ b/eeschema/tools/sch_edit_tool.cpp @@ -203,6 +203,21 @@ int SCH_EDIT_TOOL::Main( const TOOL_EVENT& aEvent ) m_frame->SaveCopyInUndoList( item, UR_CHANGED, i > 0 ); } + // Mark dangling pins at the edges of the block: + std::vector internalPoints; + + for( int i = 0; i < selection.GetSize(); ++i ) + { + SCH_ITEM* item = static_cast( selection.GetItem( i ) ); + item->GetEndPoints( internalPoints ); + } + + for( int i = 0; i < selection.GetSize(); ++i ) + { + SCH_ITEM* item = static_cast( selection.GetItem( i ) ); + item->UpdateDanglingState( internalPoints ); + } + m_cursor = controls->GetCursorPosition(); if( selection.HasReferencePoint() ) @@ -301,7 +316,10 @@ int SCH_EDIT_TOOL::Main( const TOOL_EVENT& aEvent ) if( restore_state ) m_frame->RollbackSchematicFromUndo(); else + { + m_frame->TestDanglingEnds(); m_frame->OnModify(); + } return 0; }