3D-viewer: fix Bug #1360784 (3D viewer displays only first wrl shape)

This commit is contained in:
jean-pierre charras 2014-08-24 15:29:59 +02:00
parent 6270af66e4
commit 27b9d013fd
1 changed files with 5 additions and 1 deletions

View File

@ -1421,7 +1421,6 @@ void MODULE::ReadAndInsert3DComponentShape( EDA_3D_CANVAS* glcanvas,
{ {
// Read from disk and draws the footprint 3D shapes if exists // Read from disk and draws the footprint 3D shapes if exists
S3D_MASTER* shape3D = m_3D_Drawings;
double zpos = glcanvas->GetPrm3DVisu().GetModulesZcoord3DIU( IsFlipped() ); double zpos = glcanvas->GetPrm3DVisu().GetModulesZcoord3DIU( IsFlipped() );
glPushMatrix(); glPushMatrix();
@ -1439,13 +1438,18 @@ void MODULE::ReadAndInsert3DComponentShape( EDA_3D_CANVAS* glcanvas,
glRotatef( 180.0, 0.0, 0.0, 1.0 ); glRotatef( 180.0, 0.0, 0.0, 1.0 );
} }
S3D_MASTER* shape3D = Models();
for( ; shape3D; shape3D = shape3D->Next() ) for( ; shape3D; shape3D = shape3D->Next() )
{ {
shape3D->SetLoadNonTransparentObjects( aAllowNonTransparentObjects ); shape3D->SetLoadNonTransparentObjects( aAllowNonTransparentObjects );
shape3D->SetLoadTransparentObjects( aAllowTransparentObjects ); shape3D->SetLoadTransparentObjects( aAllowTransparentObjects );
if( shape3D->Is3DType( S3D_MASTER::FILE3D_VRML ) ) if( shape3D->Is3DType( S3D_MASTER::FILE3D_VRML ) )
{
glPushMatrix();
shape3D->ReadData(); shape3D->ReadData();
glPopMatrix();
}
} }
glPopMatrix(); glPopMatrix();