diff --git a/pcbnew/generators/pcb_tuning_pattern.cpp b/pcbnew/generators/pcb_tuning_pattern.cpp index 06fdb883a3..faff21df30 100644 --- a/pcbnew/generators/pcb_tuning_pattern.cpp +++ b/pcbnew/generators/pcb_tuning_pattern.cpp @@ -25,6 +25,7 @@ #include #include +#include #include #include @@ -358,6 +359,14 @@ public: } } + void SetLayer( PCB_LAYER_ID aLayer ) override + { + PCB_GENERATOR::SetLayer( aLayer ); + + RunOnChildren( [aLayer]( BOARD_ITEM* item ) { item->SetLayer( aLayer ); }, + RECURSE_MODE::RECURSE ); + } + 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 ca92b14c52..4ea37f5a8c 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 @@ -170,6 +171,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 ); diff --git a/pcbnew/widgets/pcb_properties_panel.cpp b/pcbnew/widgets/pcb_properties_panel.cpp index 9602f53367..fb1f011e67 100644 --- a/pcbnew/widgets/pcb_properties_panel.cpp +++ b/pcbnew/widgets/pcb_properties_panel.cpp @@ -236,6 +236,8 @@ void PCB_PROPERTIES_PANEL::valueChanged( wxPropertyGridEvent& aEvent ) if( item->Type() == PCB_TABLECELL_T ) changes.Modify( item->GetParent(), nullptr, RECURSE_MODE::NO_RECURSE ); + else if( item->Type() == PCB_GENERATOR_T ) + changes.Modify( item, nullptr, RECURSE_MODE::RECURSE ); else changes.Modify( item, nullptr, RECURSE_MODE::NO_RECURSE );