Update dangling ends when dragging block.
This commit is contained in:
parent
1c8461bec7
commit
a80f7432b7
|
@ -203,6 +203,21 @@ int SCH_EDIT_TOOL::Main( const TOOL_EVENT& aEvent )
|
||||||
m_frame->SaveCopyInUndoList( item, UR_CHANGED, i > 0 );
|
m_frame->SaveCopyInUndoList( item, UR_CHANGED, i > 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Mark dangling pins at the edges of the block:
|
||||||
|
std::vector<DANGLING_END_ITEM> internalPoints;
|
||||||
|
|
||||||
|
for( int i = 0; i < selection.GetSize(); ++i )
|
||||||
|
{
|
||||||
|
SCH_ITEM* item = static_cast<SCH_ITEM*>( selection.GetItem( i ) );
|
||||||
|
item->GetEndPoints( internalPoints );
|
||||||
|
}
|
||||||
|
|
||||||
|
for( int i = 0; i < selection.GetSize(); ++i )
|
||||||
|
{
|
||||||
|
SCH_ITEM* item = static_cast<SCH_ITEM*>( selection.GetItem( i ) );
|
||||||
|
item->UpdateDanglingState( internalPoints );
|
||||||
|
}
|
||||||
|
|
||||||
m_cursor = controls->GetCursorPosition();
|
m_cursor = controls->GetCursorPosition();
|
||||||
|
|
||||||
if( selection.HasReferencePoint() )
|
if( selection.HasReferencePoint() )
|
||||||
|
@ -301,7 +316,10 @@ int SCH_EDIT_TOOL::Main( const TOOL_EVENT& aEvent )
|
||||||
if( restore_state )
|
if( restore_state )
|
||||||
m_frame->RollbackSchematicFromUndo();
|
m_frame->RollbackSchematicFromUndo();
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
m_frame->TestDanglingEnds();
|
||||||
m_frame->OnModify();
|
m_frame->OnModify();
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue