Incremental schematic connectivity fixes.

This commit is contained in:
Wayne Stambaugh
2024-01-21 16:53:05 +00:00
parent c2bd158194
commit 2cfb7a5310
6 changed files with 90 additions and 9 deletions
+12 -1
View File
@@ -183,6 +183,7 @@ void SCH_COMMIT::pushSchEdit( const wxString& aMessage, int aCommitFlags )
bool itemsDeselected = false;
bool selectedModified = false;
bool dirtyConnectivity = false;
SCH_CLEANUP_FLAGS connectivityCleanUp = NO_CLEANUP;
if( Empty() )
return;
@@ -210,8 +211,18 @@ void SCH_COMMIT::pushSchEdit( const wxString& aMessage, int aCommitFlags )
selectedModified = true;
if( !( aCommitFlags & SKIP_CONNECTIVITY ) && schItem->IsConnectable() )
{
dirtyConnectivity = true;
// Do a local clean up if there are any connectable objects in the commit.
if( connectivityCleanUp == NO_CLEANUP )
connectivityCleanUp = LOCAL_CLEANUP;
// Do a full rebauild of the connectivity if there is a sheet in the commit.
if( schItem->Type() == SCH_SHEET_T )
connectivityCleanUp = GLOBAL_CLEANUP;
}
switch( changeType )
{
case CHT_ADD:
@@ -327,7 +338,7 @@ void SCH_COMMIT::pushSchEdit( const wxString& aMessage, int aCommitFlags )
frame->SaveCopyInUndoList( undoList, UNDO_REDO::UNSPECIFIED, false, dirtyConnectivity );
if( dirtyConnectivity )
frame->RecalculateConnections( this, NO_CLEANUP );
frame->RecalculateConnections( this, connectivityCleanUp );
}
}