From 2de4906d659adfcd4beb87407b62bc59306a220e Mon Sep 17 00:00:00 2001 From: Marek Roszko Date: Wed, 9 Mar 2022 21:30:58 -0500 Subject: [PATCH] Avoid loading duplicate shapes due to hierarchy structure Fix https://gitlab.com/kicad/code/kicad/-/issues/9416 Fix https://gitlab.com/kicad/code/kicad/-/issues/6107 --- plugins/3d/oce/loadmodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/3d/oce/loadmodel.cpp b/plugins/3d/oce/loadmodel.cpp index 81ea5d2735..3d652627fc 100644 --- a/plugins/3d/oce/loadmodel.cpp +++ b/plugins/3d/oce/loadmodel.cpp @@ -1020,7 +1020,7 @@ bool processLabel( const TDF_Label& aLabel, DATA& aData, SGNODE* aParent, if( nullptr != aItems ) aItems->push_back( pptr ); - if( stype != TopAbs_SOLID && shapeLabel.HasChild() ) + if( !aData.m_assy->IsSimpleShape( shapeLabel ) && shapeLabel.HasChild() ) { wxLogTrace( MASK_OCE, wxT( "Label %s has children" ), labelTag ); TDF_ChildIterator it;