diff --git a/pcbnew/zone.cpp b/pcbnew/zone.cpp index 7bdf7a38fd..21a32ab0ed 100644 --- a/pcbnew/zone.cpp +++ b/pcbnew/zone.cpp @@ -705,7 +705,20 @@ void ZONE::Flip( const VECTOR2I& aCentre, bool aFlipLeftRight ) { Mirror( aCentre, aFlipLeftRight ); + std::map fillsCopy; + + for( auto& [oldLayer, shapePtr] : m_FilledPolysList ) + { + fillsCopy[oldLayer] = *shapePtr; + } + SetLayerSet( FlipLayerMask( GetLayerSet(), GetBoard()->GetCopperLayerCount() ) ); + + for( auto& [oldLayer, shape] : fillsCopy ) + { + PCB_LAYER_ID newLayer = FlipLayer( oldLayer, GetBoard()->GetCopperLayerCount() ); + SetFilledPolysList( newLayer, shape ); + } }