Commit 9aba378f authored by charras's avatar charras

fixed in pcbnew: module copy: bad 3d shape list copy.

parent 20cb87a8
......@@ -70,7 +70,7 @@ MODULE::MODULE( BOARD* parent ) :
m_Value = new TEXTE_MODULE( this, TEXT_is_VALUE );
// m_Value->SetBack( this );
m_3D_Drawings.PushBack( new S3D_MASTER( this ) );
m_3D_Drawings.PushBack( new S3D_MASTER( this ) ); // Reserve one void 3D entry
}
......@@ -138,10 +138,16 @@ void MODULE::Copy( MODULE* aModule )
for( S3D_MASTER* item = aModule->m_3D_Drawings; item; item = item->Next() )
{
S3D_MASTER* t3d = new S3D_MASTER( this );
S3D_MASTER* t3d = m_3D_Drawings;
if ( t3d && t3d->m_Shape3DName.IsEmpty() )
t3d->Copy( item );
else
{
t3d = new S3D_MASTER( this );
t3d->Copy( item );
m_3D_Drawings.PushBack( t3d );
}
}
/* Copie des elements complementaires */
m_Doc = aModule->m_Doc;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment