Browse Source

Group members are still children of the board (not

the group).
revert-0c36e162
Jeff Young 7 months ago
parent
commit
4b38932129
  1. 9
      pcbnew/board.cpp
  2. 6
      pcbnew/board_commit.cpp
  3. 5
      pcbnew/footprint.cpp

9
pcbnew/board.cpp

@ -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 );

6
pcbnew/board_commit.cpp

@ -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 );
}
}

5
pcbnew/footprint.cpp

@ -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;

Loading…
Cancel
Save