Be more pedantic about RECURSE_MODE.
Also fixes an invalid iterator bug. Also adds mirroring support for PCB_GROUPs. Fixes https://gitlab.com/kicad/code/kicad/-/issues/21107
This commit is contained in:
@@ -2190,6 +2190,7 @@ const std::vector<KICAD_T> EDIT_TOOL::MirrorableItems = {
|
||||
PCB_TRACE_T,
|
||||
PCB_ARC_T,
|
||||
PCB_VIA_T,
|
||||
PCB_GROUP_T,
|
||||
PCB_GENERATOR_T,
|
||||
};
|
||||
|
||||
@@ -2251,7 +2252,7 @@ int EDIT_TOOL::Mirror( const TOOL_EVENT& aEvent )
|
||||
continue;
|
||||
|
||||
if( !item->IsNew() && !item->IsMoving() )
|
||||
commit->Modify( item );
|
||||
commit->Modify( item, nullptr, RECURSE_MODE::RECURSE );
|
||||
|
||||
// modify each object as necessary
|
||||
switch( item->Type() )
|
||||
@@ -2287,6 +2288,10 @@ int EDIT_TOOL::Mirror( const TOOL_EVENT& aEvent )
|
||||
static_cast<PCB_TRACK*>( item )->Mirror( mirrorPoint, flipDirection );
|
||||
break;
|
||||
|
||||
case PCB_GROUP_T:
|
||||
static_cast<PCB_GROUP*>( item )->Mirror( mirrorPoint, flipDirection );
|
||||
break;
|
||||
|
||||
case PCB_GENERATOR_T:
|
||||
static_cast<PCB_GENERATOR*>( item )->Mirror( mirrorPoint, flipDirection );
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user