Exception in Check

This commit is contained in:
skv 2014-01-28 09:15:19 +00:00
parent de29e543b9
commit 2796ee3c59

View File

@ -360,22 +360,25 @@ void MeasureGUI_CheckCompoundOfBlocksDlg::onErrorsListSelectionChanged()
return; return;
} }
GEOM::GEOM_IBlocksOperations::BCError aErr = aErrs[aCurItem];
GEOM::ListOfLong aObjLst = aErr.incriminated;
QStringList aSubShapeList;
TopoDS_Shape aSelShape;
if ( !myObj->_is_nil() && GEOMBase::GetShape( myObj, aSelShape ) ) {
TopTools_IndexedMapOfShape anIndices;
TopExp::MapShapes( aSelShape, anIndices );
for ( int i = 0, n = aObjLst.length(); i < n; i++ ) {
TopoDS_Shape aSubShape = anIndices.FindKey( aObjLst[i] );
QString aType = GEOMBase::GetShapeTypeString( aSubShape );
if ( !aType.isEmpty() )
aSubShapeList.append( QString( "%1_%2" ).arg( aType ).arg( aObjLst[i] ) );
}
}
myGrp->ListBox2->clear(); myGrp->ListBox2->clear();
myGrp->ListBox2->addItems( aSubShapeList );
if (aCurItem < aErrs.length()) {
GEOM::GEOM_IBlocksOperations::BCError aErr = aErrs[aCurItem];
GEOM::ListOfLong aObjLst = aErr.incriminated;
QStringList aSubShapeList;
TopoDS_Shape aSelShape;
if ( !myObj->_is_nil() && GEOMBase::GetShape( myObj, aSelShape ) ) {
TopTools_IndexedMapOfShape anIndices;
TopExp::MapShapes( aSelShape, anIndices );
for ( int i = 0, n = aObjLst.length(); i < n; i++ ) {
TopoDS_Shape aSubShape = anIndices.FindKey( aObjLst[i] );
QString aType = GEOMBase::GetShapeTypeString( aSubShape );
if ( !aType.isEmpty() )
aSubShapeList.append( QString( "%1_%2" ).arg( aType ).arg( aObjLst[i] ) );
}
}
myGrp->ListBox2->addItems( aSubShapeList );
}
} }
//================================================================================= //=================================================================================