schematic: convert RunOnChildren to also take recursion mode argument

Prepping for SCH_GROUPS, making consistent with the PCB code.
This commit is contained in:
Mike Williams
2025-03-27 13:16:09 -04:00
parent a90b8ec57a
commit c67924ccac
28 changed files with 77 additions and 49 deletions
+5 -3
View File
@@ -137,7 +137,8 @@ void SCH_COMMIT::pushLibEdit( const wxString& aMessage, int aCommitFlags )
[&]( SCH_ITEM* aChild )
{
view->Update( aChild );
} );
},
RECURSE_MODE::NO_RECURSE );
}
if( !( aCommitFlags & SKIP_UNDO ) )
@@ -220,7 +221,8 @@ void SCH_COMMIT::pushSchEdit( const wxString& aMessage, int aCommitFlags )
{
if( aChild->IsSelected() )
selectedModified = true;
} );
},
RECURSE_MODE::NO_RECURSE );
}
auto updateConnectivityFlag = [&]()
@@ -580,7 +582,7 @@ void SCH_COMMIT::Revert()
if( unselect )
{
item->ClearSelected();
item->RunOnChildren( []( SCH_ITEM* aChild ) { aChild->ClearSelected(); } );
item->RunOnChildren( []( SCH_ITEM* aChild ) { aChild->ClearSelected(); }, RECURSE_MODE::NO_RECURSE );
}
// Special cases for items which have instance data