diff --git a/pcbnew/generators/pcb_tuning_pattern.cpp b/pcbnew/generators/pcb_tuning_pattern.cpp index 6c95c2ef45..d4980caf70 100644 --- a/pcbnew/generators/pcb_tuning_pattern.cpp +++ b/pcbnew/generators/pcb_tuning_pattern.cpp @@ -25,6 +25,7 @@ #include #include +#include #include #include @@ -355,6 +356,13 @@ public: } } + void SetLayer( PCB_LAYER_ID aLayer ) override + { + PCB_GENERATOR::SetLayer( aLayer ); + + RunOnChildren( [aLayer]( BOARD_ITEM* item ) { item->SetLayer( aLayer ); } ); + } + const BOX2I GetBoundingBox() const override { return getOutline().BBox(); diff --git a/pcbnew/tools/global_edit_tool.cpp b/pcbnew/tools/global_edit_tool.cpp index f17362d26d..5bc400f8c0 100644 --- a/pcbnew/tools/global_edit_tool.cpp +++ b/pcbnew/tools/global_edit_tool.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -171,6 +172,9 @@ int GLOBAL_EDIT_TOOL::SwapLayers( const TOOL_EVENT& aEvent ) } } + for( PCB_GENERATOR* generator : frame()->GetBoard()->Generators() ) + hasChanges |= swapBoardItem( generator, layerMap ); + for( BOARD_ITEM* zone : frame()->GetBoard()->Zones() ) hasChanges |= swapBoardItem( zone, layerMap );