Update TestDanglingEnds to O(n) speed
The elements don't care which they connect to, so don't search for
points on the page, just collect them all and then test them all
Adjusts f3dd5b73
This commit is contained in:
@@ -305,12 +305,6 @@ void SCH_COMMIT::pushSchEdit( const wxString& aMessage, int aCommitFlags )
|
||||
schItem->ClearEditFlags();
|
||||
}
|
||||
|
||||
if( frame )
|
||||
{
|
||||
frame->RecalculateConnections( this, NO_CLEANUP );
|
||||
frame->TestDanglingEnds();
|
||||
}
|
||||
|
||||
if( schematic )
|
||||
{
|
||||
if( bulkAddedItems.size() > 0 )
|
||||
@@ -326,7 +320,10 @@ void SCH_COMMIT::pushSchEdit( const wxString& aMessage, int aCommitFlags )
|
||||
if( !( aCommitFlags & SKIP_UNDO ) )
|
||||
{
|
||||
if( frame )
|
||||
{
|
||||
frame->SaveCopyInUndoList( undoList, UNDO_REDO::UNSPECIFIED, false, dirtyConnectivity );
|
||||
frame->RecalculateConnections( this, NO_CLEANUP );
|
||||
}
|
||||
}
|
||||
|
||||
m_toolMgr->PostEvent( { TC_MESSAGE, TA_MODEL_CHANGE, AS_GLOBAL } );
|
||||
@@ -528,7 +525,6 @@ void SCH_COMMIT::Revert()
|
||||
if( frame )
|
||||
{
|
||||
frame->RecalculateConnections( nullptr, NO_CLEANUP );
|
||||
frame->TestDanglingEnds();
|
||||
}
|
||||
|
||||
clear();
|
||||
|
||||
Reference in New Issue
Block a user