diff --git a/pcbnew/class_module.cpp b/pcbnew/class_module.cpp index 34aa160e44..2e5567870c 100644 --- a/pcbnew/class_module.cpp +++ b/pcbnew/class_module.cpp @@ -95,7 +95,7 @@ MODULE::MODULE( const MODULE& aModule ) : // Copy auxiliary data: Pads for( D_PAD* pad : aModule.Pads() ) - Add( new D_PAD( *pad ) ); + Add( static_cast( pad->Clone() ) ); // Copy auxiliary data: Zones for( MODULE_ZONE_CONTAINER* item : aModule.Zones() ) diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index 1a2aa94825..2085eb9482 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -115,6 +115,7 @@ D_PAD::D_PAD( const D_PAD& aOther ) : m_effectiveBoundingRadius = aOther.m_effectiveBoundingRadius; m_removeUnconnectedLayer = aOther.m_removeUnconnectedLayer; m_keepTopBottomLayer = aOther.m_keepTopBottomLayer; + const_cast( m_Uuid ) = aOther.m_Uuid; }