Salome HOME
22526: SMESH 2864 - Projection and Extrusion
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_ComputeDlg.cxx
index 5e94420228725a4ab7a7dc9b51caccf90830c87a..1966e750d82e3fd3764130f88e9fbdeb245935ba 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -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();
+          }
         }
       }
     }
@@ -615,8 +619,8 @@ QFrame* SMESHGUI_ComputeDlg::createMainFrame (QWidget* theParent, bool ForEval)
 
   // add all widgets to aFrame
   QVBoxLayout* aLay = new QVBoxLayout(aFrame);
-  aLay->setMargin( 0 );
-  aLay->setSpacing( 0 );
+  aLay->setMargin( MARGIN );
+  aLay->setSpacing( SPACING );
   aLay->addWidget( aPixGrp );
   aLay->addWidget( nameBox );
   aLay->addWidget( myBriefInfo );
@@ -897,7 +901,9 @@ void SMESHGUI_BaseComputeOp::computeMesh()
 
     // NPAL16631: if ( !memoryLack )
     {
-      SMESH::ModifiedMesh(aMeshSObj, !computeFailed, myMesh->NbNodes() == 0);
+      SMESH::ModifiedMesh( aMeshSObj,
+                           !computeFailed && aHypErrors.isEmpty(),
+                           myMesh->NbNodes() == 0);
       update( UF_ObjBrowser | UF_Model );
 
       // SHOW MESH
@@ -1193,7 +1199,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 +1213,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() );
       }
     }