Group members are still children of the board (not

the group).
This commit is contained in:
Jeff Young 2025-03-09 17:20:44 +00:00
parent b13318b854
commit 4b38932129
3 changed files with 4 additions and 16 deletions

View File

@ -538,18 +538,15 @@ void BOARD::RunOnDescendants( const std::function<void ( BOARD_ITEM* )>& aFuncti
for( PCB_MARKER* marker : m_markers )
aFunction( marker );
for( PCB_GROUP* group : m_groups )
aFunction( group );
for( FOOTPRINT* footprint : m_footprints )
{
aFunction( footprint );
footprint->RunOnDescendants( aFunction, aDepth + 1 );
}
for( PCB_GROUP* group : m_groups )
{
aFunction( group );
group->RunOnDescendants( aFunction, aDepth + 1 );
}
for( BOARD_ITEM* drawing : m_drawings )
{
aFunction( drawing );

View File

@ -210,12 +210,6 @@ void BOARD_COMMIT::propagateDamage( BOARD_ITEM* aChangedItem, std::vector<ZONE*>
for( BOARD_ITEM* item : board->Drawings() )
{
item->RunOnDescendants(
[&]( BOARD_ITEM* child )
{
checkItem( child );
} );
checkItem( item );
}
}

View File

@ -2201,10 +2201,7 @@ void FOOTPRINT::RunOnDescendants( const std::function<void( BOARD_ITEM* )>& aFun
aFunction( zone );
for( PCB_GROUP* group : m_groups )
{
aFunction( group );
group->RunOnDescendants( aFunction, aDepth + 1 );
}
for( BOARD_ITEM* drawing : m_drawings )
{
@ -2688,7 +2685,7 @@ BOARD_ITEM* FOOTPRINT::DuplicateItem( const BOARD_ITEM* aItem, bool aAddToFootpr
Add( aCurrItem );
} );
Add( new_item );
Add( group );
}
new_item = group;