]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
22455: Error "No mesh elements assigned to a face" is raised instead of a simple...
authoreap <eap@opencascade.com>
Fri, 10 Jan 2014 08:01:57 +0000 (08:01 +0000)
committereap <eap@opencascade.com>
Fri, 10 Jan 2014 08:01:57 +0000 (08:01 +0000)
1) Fix finding a shape in a study
2) Append study entry to a name of published failed sub-shape

src/SMESHGUI/SMESHGUI_ComputeDlg.cxx

index 5e94420228725a4ab7a7dc9b51caccf90830c87a..d4e2d238b592d7a0e3752359eeabe3a9dfa08e89 100644 (file)
@@ -382,7 +382,11 @@ namespace SMESH
         if ( !geom->_is_nil() ) {
           GEOM::ListOfLong_var list = geom->GetSubShapeIndices();
           if ( list->length() == 1 && list[0] == subShapeID )
-            subSO = it->Value();
+          {
+            GEOM::GEOM_Object_var mainGO = geom->GetMainShape();
+            if ( aMainShape->IsSame( mainGO ))
+              subSO = it->Value();
+          }
         }
       }
     }
@@ -1193,7 +1197,8 @@ void SMESHGUI_BaseComputeOp::onPublishShape()
             if ( so->_is_nil() ) {
               CORBA::String_var name  = so->GetName();
               CORBA::String_var entry = so->GetID();
-              table()->item( r, COL_SHAPE     )->setText( name.in() );
+              QString       shapeText = QString("%1 (%2)").arg( name.in() ).arg( entry.in() );
+              table()->item( r, COL_SHAPE     )->setText( shapeText );
               table()->item( r, COL_PUBLISHED )->setText( entry.in() );
             }
             break;
@@ -1206,7 +1211,8 @@ void SMESHGUI_BaseComputeOp::onPublishShape()
       if ( !so->_is_nil() ) {
         CORBA::String_var name  = so->GetName();
         CORBA::String_var entry = so->GetID();
-        table()->item( row, COL_SHAPE     )->setText( name.in() );
+        QString       shapeText = QString("%1 (%2)").arg( name.in() ).arg( entry.in() );
+        table()->item( row, COL_SHAPE     )->setText( shapeText );
         table()->item( row, COL_PUBLISHED )->setText( entry.in() );
       }
     }