22455: Error "No mesh elements assigned to a face" is raised instead of a simple warning

Append study entry to a failed sub-shape name,
else it's hard to find a sub-shape in the study
This commit is contained in:
eap 2014-01-09 15:08:07 +00:00
parent 072a73120b
commit dda95cb5b7

View File

@ -439,8 +439,10 @@ namespace SMESH
QString shapeText(int subShapeID, GEOM::GEOM_Object_var aMainShape ) QString shapeText(int subShapeID, GEOM::GEOM_Object_var aMainShape )
{ {
QString text; QString text;
if ( _PTR(SObject) aSO = getSubShapeSO( subShapeID, aMainShape )) if ( _PTR(SObject) aSO = getSubShapeSO( subShapeID, aMainShape )) {
text = aSO->GetName().c_str(); text = aSO->GetName().c_str();
text += QString(" (%1)").arg( aSO->GetID().c_str() );
}
else { else {
text = QString("#%1").arg( subShapeID ); text = QString("#%1").arg( subShapeID );
GEOM::GEOM_Object_wrap shape = getSubShape( subShapeID, aMainShape ); GEOM::GEOM_Object_wrap shape = getSubShape( subShapeID, aMainShape );