pcbnew: Ensure we are cloning pads
When calling MODULE::Clone() we need to clone the pads as well or we will end up with scm churn when running undo/redo operations
This commit is contained in:
parent
24435fcc62
commit
35eda030a2
|
@ -95,7 +95,7 @@ MODULE::MODULE( const MODULE& aModule ) :
|
||||||
|
|
||||||
// Copy auxiliary data: Pads
|
// Copy auxiliary data: Pads
|
||||||
for( D_PAD* pad : aModule.Pads() )
|
for( D_PAD* pad : aModule.Pads() )
|
||||||
Add( new D_PAD( *pad ) );
|
Add( static_cast<D_PAD*>( pad->Clone() ) );
|
||||||
|
|
||||||
// Copy auxiliary data: Zones
|
// Copy auxiliary data: Zones
|
||||||
for( MODULE_ZONE_CONTAINER* item : aModule.Zones() )
|
for( MODULE_ZONE_CONTAINER* item : aModule.Zones() )
|
||||||
|
|
|
@ -115,6 +115,7 @@ D_PAD::D_PAD( const D_PAD& aOther ) :
|
||||||
m_effectiveBoundingRadius = aOther.m_effectiveBoundingRadius;
|
m_effectiveBoundingRadius = aOther.m_effectiveBoundingRadius;
|
||||||
m_removeUnconnectedLayer = aOther.m_removeUnconnectedLayer;
|
m_removeUnconnectedLayer = aOther.m_removeUnconnectedLayer;
|
||||||
m_keepTopBottomLayer = aOther.m_keepTopBottomLayer;
|
m_keepTopBottomLayer = aOther.m_keepTopBottomLayer;
|
||||||
|
const_cast<KIID&>( m_Uuid ) = aOther.m_Uuid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue