From: skv Date: Tue, 28 Jan 2014 09:15:19 +0000 (+0000) Subject: Exception in Check X-Git-Tag: V7_4_0a1~36 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2796ee3c59261b90400040b69b7def11908e23d4;p=modules%2Fgeom.git Exception in Check --- diff --git a/src/MeasureGUI/MeasureGUI_CheckCompoundOfBlocksDlg.cxx b/src/MeasureGUI/MeasureGUI_CheckCompoundOfBlocksDlg.cxx index 7b1d13987..e7fc90a4c 100644 --- a/src/MeasureGUI/MeasureGUI_CheckCompoundOfBlocksDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_CheckCompoundOfBlocksDlg.cxx @@ -360,22 +360,25 @@ void MeasureGUI_CheckCompoundOfBlocksDlg::onErrorsListSelectionChanged() 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(); + + 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 ); } - myGrp->ListBox2->clear(); - myGrp->ListBox2->addItems( aSubShapeList ); } //=================================================================================