Don't double-tap Connectivity Recalculate

SCH_EDIT_FRAME::RecalculateConnections() calls SchematicCleanup and then
resets the connectivity graph and recalculates it.  OnModify() also
calls RecalculateConnections().  For long calculation schematics, this
can impact usability
This commit is contained in:
Seth Hillbrand 2023-01-24 10:28:56 -08:00
parent 420eceecbb
commit 43e4797d4d
3 changed files with 6 additions and 6 deletions

View File

@ -1338,7 +1338,7 @@ void SCH_EDIT_FRAME::AddItemToScreenAndUndoList( SCH_SCREEN* aScreen, SCH_ITEM*
}
// Update connectivity info for new item
if( !aItem->IsMoving() )
if( !aItem->IsMoving() && aItem->IsConnectable() )
RecalculateConnections( LOCAL_CLEANUP );
}

View File

@ -775,7 +775,7 @@ int SCH_EDIT_TOOL::Rotate( const TOOL_EVENT& aEvent )
lwbTool->TrimOverLappingWires( &selectionCopy );
lwbTool->AddJunctionsIfNeeded( &selectionCopy );
m_frame->RecalculateConnections( LOCAL_CLEANUP );
m_frame->SchematicCleanUp();
m_frame->TestDanglingEnds();
m_frame->OnModify();
@ -969,7 +969,7 @@ int SCH_EDIT_TOOL::Mirror( const TOOL_EVENT& aEvent )
lwbTool->TrimOverLappingWires( &selectionCopy );
lwbTool->AddJunctionsIfNeeded( &selectionCopy );
m_frame->RecalculateConnections( LOCAL_CLEANUP );
m_frame->SchematicCleanUp();
m_frame->TestDanglingEnds();
}
@ -1155,7 +1155,7 @@ int SCH_EDIT_TOOL::RepeatDrawItem( const TOOL_EVENT& aEvent )
lwbTool->TrimOverLappingWires( &newItems );
lwbTool->AddJunctionsIfNeeded( &newItems );
m_frame->RecalculateConnections( LOCAL_CLEANUP );
m_frame->SchematicCleanUp();
m_frame->TestDanglingEnds();
}

View File

@ -930,7 +930,7 @@ int SCH_MOVE_TOOL::Main( const TOOL_EVENT& aEvent )
for( EDA_ITEM* item : selection )
m_frame->AutoRotateItem( m_frame->GetScreen(), static_cast<SCH_ITEM*>( item ) );
m_frame->RecalculateConnections( LOCAL_CLEANUP );
m_frame->SchematicCleanUp();
m_frame->OnModify();
}
@ -1735,7 +1735,7 @@ int SCH_MOVE_TOOL::AlignElements( const TOOL_EVENT& aEvent )
m_toolMgr->PostEvent( EVENTS::SelectedItemsMoved );
m_frame->RecalculateConnections( LOCAL_CLEANUP );
m_frame->SchematicCleanUp();
m_frame->TestDanglingEnds();
m_frame->OnModify();