Don't double mirror groups.

Also removes previous fix, which had side-effects.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8121

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20465
This commit is contained in:
Jeff Young 2025-08-21 12:26:40 +01:00
parent 73bb65b802
commit 3f85071f91
2 changed files with 0 additions and 24 deletions

View File

@ -133,12 +133,7 @@ EDA_GROUP* getNestedGroup( BOARD_ITEM* aItem, EDA_GROUP* aScope, bool isFootprin
return nullptr;
while( group && group->AsEdaItem()->GetParentGroup() && group->AsEdaItem()->GetParentGroup() != aScope )
{
if( group->AsEdaItem()->GetParent()->Type() == PCB_FOOTPRINT_T && isFootprintEditor )
break;
group = group->AsEdaItem()->GetParentGroup();
}
return group;
}

View File

@ -2321,26 +2321,7 @@ int EDIT_TOOL::Mirror( const TOOL_EVENT& aEvent )
FLIP_DIRECTION flipDirection = aEvent.IsAction( &PCB_ACTIONS::mirrorV ) ? FLIP_DIRECTION::TOP_BOTTOM
: FLIP_DIRECTION::LEFT_RIGHT;
std::vector<EDA_ITEM*> items;
for( EDA_ITEM* item : selection )
{
if( item->Type() == PCB_GROUP_T )
{
static_cast<PCB_GROUP*>( item )->RunOnChildren(
[&]( BOARD_ITEM* descendant )
{
items.push_back( descendant );
},
RECURSE_MODE::RECURSE );
}
else
{
items.push_back( item );
}
}
for( EDA_ITEM* item : items )
{
if( !item->IsType( MirrorableItems ) )
continue;