Salome HOME
untabify
authoreap <eap@opencascade.com>
Thu, 1 Oct 2009 06:28:20 +0000 (06:28 +0000)
committereap <eap@opencascade.com>
Thu, 1 Oct 2009 06:28:20 +0000 (06:28 +0000)
67 files changed:
src/SMESHGUI/SMESHGUI.cxx
src/SMESHGUI/SMESHGUI_AddMeshElementDlg.cxx
src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx
src/SMESHGUI/SMESHGUI_BuildCompoundDlg.cxx
src/SMESHGUI/SMESHGUI_ClippingDlg.cxx
src/SMESHGUI/SMESHGUI_ClippingDlg.h
src/SMESHGUI/SMESHGUI_ConvToQuadOp.cxx
src/SMESHGUI/SMESHGUI_CreatePatternDlg.cxx
src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.cxx
src/SMESHGUI/SMESHGUI_DeleteGroupDlg.cxx
src/SMESHGUI/SMESHGUI_Displayer.cxx
src/SMESHGUI/SMESHGUI_EditMeshDlg.cxx
src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx
src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx
src/SMESHGUI/SMESHGUI_FilterDlg.cxx
src/SMESHGUI/SMESHGUI_FilterDlg.h
src/SMESHGUI/SMESHGUI_FilterLibraryDlg.cxx
src/SMESHGUI/SMESHGUI_GEOMGenUtils.cxx
src/SMESHGUI/SMESHGUI_GroupDlg.cxx
src/SMESHGUI/SMESHGUI_GroupOpDlg.cxx
src/SMESHGUI/SMESHGUI_GroupUtils.cxx
src/SMESHGUI/SMESHGUI_GroupUtils.h
src/SMESHGUI/SMESHGUI_Hypotheses.cxx
src/SMESHGUI/SMESHGUI_Hypotheses.h
src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx
src/SMESHGUI/SMESHGUI_HypothesesUtils.h
src/SMESHGUI/SMESHGUI_IdValidator.h
src/SMESHGUI/SMESHGUI_Make2DFrom3DOp.cxx
src/SMESHGUI/SMESHGUI_MeshDlg.cxx
src/SMESHGUI/SMESHGUI_MeshInfosBox.cxx
src/SMESHGUI/SMESHGUI_MeshInfosDlg.cxx
src/SMESHGUI/SMESHGUI_MeshOp.cxx
src/SMESHGUI/SMESHGUI_MeshOp.h
src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx
src/SMESHGUI/SMESHGUI_MeshUtils.cxx
src/SMESHGUI/SMESHGUI_MoveNodesDlg.cxx
src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx
src/SMESHGUI/SMESHGUI_MultiEditDlg.h
src/SMESHGUI/SMESHGUI_Operation.cxx
src/SMESHGUI/SMESHGUI_PatternWidget.cxx
src/SMESHGUI/SMESHGUI_PatternWidget.h
src/SMESHGUI/SMESHGUI_Preferences_ColorDlg.cxx
src/SMESHGUI/SMESHGUI_Preferences_ScalarBarDlg.cxx
src/SMESHGUI/SMESHGUI_Preferences_ScalarBarDlg.h
src/SMESHGUI/SMESHGUI_RemoveElementsDlg.cxx
src/SMESHGUI/SMESHGUI_RemoveNodesDlg.cxx
src/SMESHGUI/SMESHGUI_RenumberingDlg.cxx
src/SMESHGUI/SMESHGUI_RevolutionDlg.cxx
src/SMESHGUI/SMESHGUI_RotationDlg.cxx
src/SMESHGUI/SMESHGUI_Selection.cxx
src/SMESHGUI/SMESHGUI_SelectionOp.h
src/SMESHGUI/SMESHGUI_SewingDlg.cxx
src/SMESHGUI/SMESHGUI_ShapeByMeshDlg.cxx
src/SMESHGUI/SMESHGUI_SingleEditDlg.cxx
src/SMESHGUI/SMESHGUI_SmoothingDlg.cxx
src/SMESHGUI/SMESHGUI_SpinBox.cxx
src/SMESHGUI/SMESHGUI_StandardMeshInfosDlg.cxx
src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx
src/SMESHGUI/SMESHGUI_TranslationDlg.cxx
src/SMESHGUI/SMESHGUI_TransparencyDlg.cxx
src/SMESHGUI/SMESHGUI_Utils.cxx
src/SMESHGUI/SMESHGUI_Utils.h
src/SMESHGUI/SMESHGUI_VTKUtils.cxx
src/SMESHGUI/SMESHGUI_VTKUtils.h
src/SMESHGUI/SMESHGUI_WhatIsDlg.cxx
src/SMESHGUI/SMESHGUI_XmlHandler.cxx
src/SMESHGUI/SMESHGUI_XmlHandler.h

index 66aefe0e2a51f0b182030d53f259ab96477796f9..2f6898312af88b20e2070382720b27f1611fee44 100644 (file)
 #include CORBA_CLIENT_HEADER(SMESH_MeshEditor)
 
 // Qt includes
-// #define      INCLUDE_MENUITEM_DEF // VSR commented ????????
+// #define       INCLUDE_MENUITEM_DEF // VSR commented ????????
 #include <QMenu>
 
 // BOOST includes
   // Declarations
   //=============================================================
   void ImportMeshesFromFile(SMESH::SMESH_Gen_ptr theComponentMesh,
-                           int theCommandID);
+                            int theCommandID);
 
   void ExportMeshToFile(int theCommandID);
 
   // Definitions
   //=============================================================
   void ImportMeshesFromFile( SMESH::SMESH_Gen_ptr theComponentMesh,
-                            int theCommandID )
+                             int theCommandID )
   {
     QStringList filter;
     std::string myExtension;
       anInitialPath = QDir::currentPath();
 
     QStringList filenames = SUIT_FileDlg::getOpenFileNames( SMESHGUI::desktop(),
-                                                           anInitialPath,
-                                                           filter,
-                                                           QObject::tr( "SMESH_IMPORT_MESH" ) );
+                                                            anInitialPath,
+                                                            filter,
+                                                            QObject::tr( "SMESH_IMPORT_MESH" ) );
     if ( filenames.count() > 0 ) {
       SUIT_OverrideCursor wc;
       _PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
       QStringList errors;
       bool isEmpty = false;
       for ( QStringList::ConstIterator it = filenames.begin(); it != filenames.end(); ++it ) {
-       QString filename = *it;
-       SMESH::mesh_array_var aMeshes = new SMESH::mesh_array;
-       try {
-         switch ( theCommandID ) {
-         case 111:
-           {
-             // DAT format (currently unsupported)
-             errors.append( QString( "%1 :\n\t%2" ).arg( filename ).
-                            arg( QObject::tr( "SMESH_ERR_NOT_SUPPORTED_FORMAT" ) ) );
-             break;
-           }
-         case 112:
-           {
-             // UNV format
-             aMeshes->length( 1 );
-             aMeshes[0] = theComponentMesh->CreateMeshesFromUNV( filename.toLatin1().constData() );
-             if ( aMeshes[0]->_is_nil() )
-               errors.append( QString( "%1 :\n\t%2" ).arg( filename ).
-                              arg( QObject::tr( "SMESH_ERR_UNKNOWN_IMPORT_ERROR" ) ) );
-             break;
-           }
-         case 113:
-           {
-             // MED format
-             SMESH::DriverMED_ReadStatus res;
-             aMeshes = theComponentMesh->CreateMeshesFromMED( filename.toLatin1().constData(), res );
-             if ( res != SMESH::DRS_OK ) {
-               errors.append( QString( "%1 :\n\t%2" ).arg( filename ).
-                              arg( QObject::tr( QString( "SMESH_DRS_%1" ).arg( res ).toLatin1().data() ) ) );
-             }
-             break;
-           }
-         }
-       }
-       catch ( const SALOME::SALOME_Exception& S_ex ) {
-         errors.append( QString( "%1 :\n\t%2" ).arg( filename ).
-                        arg( QObject::tr( "SMESH_ERR_UNKNOWN_IMPORT_ERROR" ) ) );
-       }
-
-       for ( int i = 0, iEnd = aMeshes->length(); i < iEnd; i++ ) {
-         _PTR(SObject) aMeshSO = SMESH::FindSObject( aMeshes[i] );
-         if ( aMeshSO ) {
-           _PTR(StudyBuilder) aBuilder = aStudy->NewBuilder();
-           _PTR(AttributePixMap) aPixmap = aBuilder->FindOrCreateAttribute( aMeshSO, "AttributePixMap" );
-           aPixmap->SetPixMap( "ICON_SMESH_TREE_MESH_IMPORTED" );
-           if ( theCommandID == 112 ) // mesh names aren't taken from the file for UNV import
-             SMESH::SetName( aMeshSO, QFileInfo(filename).fileName() );
-         }
-         else {
-           isEmpty = true;
-         }
-       }
+        QString filename = *it;
+        SMESH::mesh_array_var aMeshes = new SMESH::mesh_array;
+        try {
+          switch ( theCommandID ) {
+          case 111:
+            {
+              // DAT format (currently unsupported)
+              errors.append( QString( "%1 :\n\t%2" ).arg( filename ).
+                             arg( QObject::tr( "SMESH_ERR_NOT_SUPPORTED_FORMAT" ) ) );
+              break;
+            }
+          case 112:
+            {
+              // UNV format
+              aMeshes->length( 1 );
+              aMeshes[0] = theComponentMesh->CreateMeshesFromUNV( filename.toLatin1().constData() );
+              if ( aMeshes[0]->_is_nil() )
+                errors.append( QString( "%1 :\n\t%2" ).arg( filename ).
+                               arg( QObject::tr( "SMESH_ERR_UNKNOWN_IMPORT_ERROR" ) ) );
+              break;
+            }
+          case 113:
+            {
+              // MED format
+              SMESH::DriverMED_ReadStatus res;
+              aMeshes = theComponentMesh->CreateMeshesFromMED( filename.toLatin1().constData(), res );
+              if ( res != SMESH::DRS_OK ) {
+                errors.append( QString( "%1 :\n\t%2" ).arg( filename ).
+                               arg( QObject::tr( QString( "SMESH_DRS_%1" ).arg( res ).toLatin1().data() ) ) );
+              }
+              break;
+            }
+          }
+        }
+        catch ( const SALOME::SALOME_Exception& S_ex ) {
+          errors.append( QString( "%1 :\n\t%2" ).arg( filename ).
+                         arg( QObject::tr( "SMESH_ERR_UNKNOWN_IMPORT_ERROR" ) ) );
+        }
+
+        for ( int i = 0, iEnd = aMeshes->length(); i < iEnd; i++ ) {
+          _PTR(SObject) aMeshSO = SMESH::FindSObject( aMeshes[i] );
+          if ( aMeshSO ) {
+            _PTR(StudyBuilder) aBuilder = aStudy->NewBuilder();
+            _PTR(AttributePixMap) aPixmap = aBuilder->FindOrCreateAttribute( aMeshSO, "AttributePixMap" );
+            aPixmap->SetPixMap( "ICON_SMESH_TREE_MESH_IMPORTED" );
+            if ( theCommandID == 112 ) // mesh names aren't taken from the file for UNV import
+              SMESH::SetName( aMeshSO, QFileInfo(filename).fileName() );
+          }
+          else {
+            isEmpty = true;
+          }
+        }
       }
 
       // update Object browser
 
       // show Error message box if there were errors
       if ( errors.count() > 0 ) {
-       SUIT_MessageBox::critical( SMESHGUI::desktop(),
-                                  QObject::tr( "SMESH_ERROR" ),
-                                  QObject::tr( "SMESH_IMPORT_ERRORS" ) + "\n" + errors.join( "\n" ) );
+        SUIT_MessageBox::critical( SMESHGUI::desktop(),
+                                   QObject::tr( "SMESH_ERROR" ),
+                                   QObject::tr( "SMESH_IMPORT_ERRORS" ) + "\n" + errors.join( "\n" ) );
       }
 
       // show warning message box, if some imported mesh is empty
       if ( isEmpty ) {
-         SUIT_MessageBox::warning( SMESHGUI::desktop(),
-                                   QObject::tr( "SMESH_WRN_WARNING" ),
-                                   QObject::tr( "SMESH_DRS_SOME_EMPTY" ) );
+          SUIT_MessageBox::warning( SMESHGUI::desktop(),
+                                    QObject::tr( "SMESH_WRN_WARNING" ),
+                                    QObject::tr( "SMESH_DRS_SOME_EMPTY" ) );
       }
     }
   }
   }
 
   inline void InverseEntityMode(unsigned int& theOutputMode,
-                               unsigned int theMode)
+                                unsigned int theMode)
   {
     bool anIsNotPresent = ~theOutputMode & theMode;
     if(anIsNotPresent)
     if(selected.Extent() >= 1){
       SALOME_ListIteratorOfListIO It( selected );
       for( ; It.More(); It.Next()){
-       Handle(SALOME_InteractiveObject) IObject = It.Value();
-       if(IObject->hasEntry()){
-         if(SMESH_Actor *anActor = SMESH::FindActorByEntry(IObject->getEntry())){
-           unsigned int aMode = anActor->GetEntityMode();
-           switch(theCommandID){
+        Handle(SALOME_InteractiveObject) IObject = It.Value();
+        if(IObject->hasEntry()){
+          if(SMESH_Actor *anActor = SMESH::FindActorByEntry(IObject->getEntry())){
+            unsigned int aMode = anActor->GetEntityMode();
+            switch(theCommandID){
             case 216:
               InverseEntityMode(aMode,SMESH_Actor::e0DElements);
               break;
-           case 217:
-             InverseEntityMode(aMode,SMESH_Actor::eEdges);
-             break;
-           case 218:
-             InverseEntityMode(aMode,SMESH_Actor::eFaces);
-             break;
-           case 219:
-             InverseEntityMode(aMode,SMESH_Actor::eVolumes);
-             break;
-           case 220:
-             aMode = SMESH_Actor::eAllEntity;
-             break;
-           }
-           if(aMode)
-             anActor->SetEntityMode(aMode);
-         }
-       }
+            case 217:
+              InverseEntityMode(aMode,SMESH_Actor::eEdges);
+              break;
+            case 218:
+              InverseEntityMode(aMode,SMESH_Actor::eFaces);
+              break;
+            case 219:
+              InverseEntityMode(aMode,SMESH_Actor::eVolumes);
+              break;
+            case 220:
+              aMode = SMESH_Actor::eAllEntity;
+              break;
+            }
+            if(aMode)
+              anActor->SetEntityMode(aMode);
+          }
+        }
       }
     }
   }
       _PTR(SObject) aGroupSObject = SMESH::FindSObject(aGroupObject);
       if(SMESH_Actor *anActor = SMESH::FindActorByEntry(aGroupSObject->GetID().c_str()))
       {
-       if( aGroupObject->GetType() == SMESH::NODE )
-         anActor->SetNodeColor( aColor.R, aColor.G, aColor.B );
-       else if( aGroupObject->GetType() == SMESH::EDGE )
-         anActor->SetEdgeColor( aColor.R, aColor.G, aColor.B );
-       else
-         anActor->SetSufaceColor( aColor.R, aColor.G, aColor.B );
+        if( aGroupObject->GetType() == SMESH::NODE )
+          anActor->SetNodeColor( aColor.R, aColor.G, aColor.B );
+        else if( aGroupObject->GetType() == SMESH::EDGE )
+          anActor->SetEdgeColor( aColor.R, aColor.G, aColor.B );
+        else
+          anActor->SetSufaceColor( aColor.R, aColor.G, aColor.B );
       }
     }
 
       Handle(SALOME_InteractiveObject) anIObject = selected.First();
       SMESH::SMESH_Mesh_var aMesh = SMESH::IObjectToInterface<SMESH::SMESH_Mesh>(anIObject);
       if ( !aMesh->_is_nil() ) {
-       aMesh->SetAutoColor( false );
+        aMesh->SetAutoColor( false );
       }
     }
   }
     if(selected.Extent() >= 1){
       switch(theCommandID){
       case 1134:{
-       SMESHGUI::GetSMESHGUI()->EmitSignalDeactivateDialog();
-       (new SMESHGUI_ClippingDlg( SMESHGUI::GetSMESHGUI() ))->show();
-       return;
+        SMESHGUI::GetSMESHGUI()->EmitSignalDeactivateDialog();
+        (new SMESHGUI_ClippingDlg( SMESHGUI::GetSMESHGUI() ))->show();
+        return;
       }
       case 1133:{
-       SMESHGUI::GetSMESHGUI()->EmitSignalDeactivateDialog();
-       (new SMESHGUI_TransparencyDlg( SMESHGUI::GetSMESHGUI() ))->show();
-       return;
+        SMESHGUI::GetSMESHGUI()->EmitSignalDeactivateDialog();
+        (new SMESHGUI_TransparencyDlg( SMESHGUI::GetSMESHGUI() ))->show();
+        return;
       }}
       SALOME_ListIteratorOfListIO It( selected );
       for( ; It.More(); It.Next()){
-       Handle(SALOME_InteractiveObject) IObject = It.Value();
-       if(IObject->hasEntry()){
-         if(SMESH_Actor *anActor = SMESH::FindActorByEntry(IObject->getEntry())){
-           switch(theCommandID){
-           case 211:
-             anActor->SetRepresentation(SMESH_Actor::eEdge);
-             break;
-           case 212:
-             anActor->SetRepresentation(SMESH_Actor::eSurface);
-             break;
-           case 213:
-             if(anActor->IsShrunk())
-               anActor->UnShrink();
-             else
-               anActor->SetShrink();
-             break;
-           case 215:
-             anActor->SetRepresentation(SMESH_Actor::ePoint);
-             break;
+        Handle(SALOME_InteractiveObject) IObject = It.Value();
+        if(IObject->hasEntry()){
+          if(SMESH_Actor *anActor = SMESH::FindActorByEntry(IObject->getEntry())){
+            switch(theCommandID){
+            case 211:
+              anActor->SetRepresentation(SMESH_Actor::eEdge);
+              break;
+            case 212:
+              anActor->SetRepresentation(SMESH_Actor::eSurface);
+              break;
+            case 213:
+              if(anActor->IsShrunk())
+                anActor->UnShrink();
+              else
+                anActor->SetShrink();
+              break;
+            case 215:
+              anActor->SetRepresentation(SMESH_Actor::ePoint);
+              break;
             case 231:
               if(anActor->GetQuadratic2DRepresentation() != SMESH_Actor::eLines)
                 anActor->SetQuadratic2DRepresentation(SMESH_Actor::eLines);
               if(anActor->GetQuadratic2DRepresentation() != SMESH_Actor::eArcs)
                 anActor->SetQuadratic2DRepresentation(SMESH_Actor::eArcs);
               break;
-           case 1132:{
-             vtkFloatingPointType color[3];
-             anActor->GetSufaceColor(color[0], color[1], color[2]);
-             int c0 = int (color[0] * 255);
-             int c1 = int (color[1] * 255);
-             int c2 = int (color[2] * 255);
-             QColor c(c0, c1, c2);
-
-             vtkFloatingPointType edgecolor[3];
-             anActor->GetEdgeColor(edgecolor[0], edgecolor[1], edgecolor[2]);
-             c0 = int (edgecolor[0] * 255);
-             c1 = int (edgecolor[1] * 255);
-             c2 = int (edgecolor[2] * 255);
-             QColor e(c0, c1, c2);
-
-             vtkFloatingPointType backfacecolor[3];
-             anActor->GetBackSufaceColor(backfacecolor[0], backfacecolor[1], backfacecolor[2]);
-             c0 = int (backfacecolor[0] * 255);
-             c1 = int (backfacecolor[1] * 255);
-             c2 = int (backfacecolor[2] * 255);
-             QColor b(c0, c1, c2);
-
-             vtkFloatingPointType nodecolor[3];
-             anActor->GetNodeColor(nodecolor[0], nodecolor[1], nodecolor[2]);
-             c0 = int (nodecolor[0] * 255);
-             c1 = int (nodecolor[1] * 255);
-             c2 = int (nodecolor[2] * 255);
-             QColor n(c0, c1, c2);
-
-             int Edgewidth = (int)anActor->GetLineWidth();
-             if(Edgewidth == 0)
-               Edgewidth = 1;
-             int intValue = int(anActor->GetNodeSize());
-             vtkFloatingPointType Shrink = anActor->GetShrinkFactor();
-
-             SMESHGUI_Preferences_ColorDlg *aDlg =
-               new SMESHGUI_Preferences_ColorDlg( SMESHGUI::GetSMESHGUI() );
-             aDlg->SetColor(1, c);
-             aDlg->SetColor(2, e);
-             aDlg->SetColor(3, n);
-             aDlg->SetColor(4, b);
-             aDlg->SetIntValue(1, Edgewidth);
-             aDlg->SetIntValue(2, intValue);
-             aDlg->SetIntValue(3, int(Shrink*100.));
-             if(aDlg->exec()){
-               QColor color = aDlg->GetColor(1);
-               QColor edgecolor = aDlg->GetColor(2);
-               QColor nodecolor = aDlg->GetColor(3);
-               QColor backfacecolor = aDlg->GetColor(4);
-               /* actor color and backface color */
-               anActor->SetSufaceColor(vtkFloatingPointType (color.red()) / 255.,
-                                       vtkFloatingPointType (color.green()) / 255.,
-                                       vtkFloatingPointType (color.blue()) / 255.);
-               anActor->SetBackSufaceColor(vtkFloatingPointType (backfacecolor.red()) / 255.,
-                                           vtkFloatingPointType (backfacecolor.green()) / 255.,
-                                           vtkFloatingPointType (backfacecolor.blue()) / 255.);
-
-               /* edge color */
-               anActor->SetEdgeColor(vtkFloatingPointType (edgecolor.red()) / 255.,
-                                     vtkFloatingPointType (edgecolor.green()) / 255.,
-                                     vtkFloatingPointType (edgecolor.blue()) / 255.);
-
-               /* Shrink factor and size edges */
-               anActor->SetShrinkFactor(aDlg->GetIntValue(3) / 100.);
-               anActor->SetLineWidth(aDlg->GetIntValue(1));
-
-               /* Nodes color and size */
-               anActor->SetNodeColor(vtkFloatingPointType (nodecolor.red()) / 255.,
-                                     vtkFloatingPointType (nodecolor.green()) / 255.,
-                                     vtkFloatingPointType (nodecolor.blue()) / 255.);
-               anActor->SetNodeSize(aDlg->GetIntValue(2));
-
-               SMESH::SMESH_GroupBase_var aGroupObject = SMESH::IObjectToInterface<SMESH::SMESH_GroupBase>(IObject);
-               if( !aGroupObject->_is_nil() )
-               {
-                 SMESH::ElementType anElementType = aGroupObject->GetType();
-                 QColor aColor;
-                 switch( anElementType )
-                 {
-                   case SMESH::NODE: aColor = nodecolor; break;
-                   case SMESH::EDGE: aColor = edgecolor; break;
-                   default: aColor = color; break;
-                 }
-
-                 SALOMEDS::Color aGroupColor;
-                 aGroupColor.R = (float)aColor.red() / 255.0;
-                 aGroupColor.G = (float)aColor.green() / 255.0;
-                 aGroupColor.B = (float)aColor.blue() / 255.0;
-                 aGroupObject->SetColor( aGroupColor );
-               }
-
-               delete aDlg;
-             }
-             break;
-           }}
-         }
-       }
+            case 1132:{
+              vtkFloatingPointType color[3];
+              anActor->GetSufaceColor(color[0], color[1], color[2]);
+              int c0 = int (color[0] * 255);
+              int c1 = int (color[1] * 255);
+              int c2 = int (color[2] * 255);
+              QColor c(c0, c1, c2);
+
+              vtkFloatingPointType edgecolor[3];
+              anActor->GetEdgeColor(edgecolor[0], edgecolor[1], edgecolor[2]);
+              c0 = int (edgecolor[0] * 255);
+              c1 = int (edgecolor[1] * 255);
+              c2 = int (edgecolor[2] * 255);
+              QColor e(c0, c1, c2);
+
+              vtkFloatingPointType backfacecolor[3];
+              anActor->GetBackSufaceColor(backfacecolor[0], backfacecolor[1], backfacecolor[2]);
+              c0 = int (backfacecolor[0] * 255);
+              c1 = int (backfacecolor[1] * 255);
+              c2 = int (backfacecolor[2] * 255);
+              QColor b(c0, c1, c2);
+
+              vtkFloatingPointType nodecolor[3];
+              anActor->GetNodeColor(nodecolor[0], nodecolor[1], nodecolor[2]);
+              c0 = int (nodecolor[0] * 255);
+              c1 = int (nodecolor[1] * 255);
+              c2 = int (nodecolor[2] * 255);
+              QColor n(c0, c1, c2);
+
+              int Edgewidth = (int)anActor->GetLineWidth();
+              if(Edgewidth == 0)
+                Edgewidth = 1;
+              int intValue = int(anActor->GetNodeSize());
+              vtkFloatingPointType Shrink = anActor->GetShrinkFactor();
+
+              SMESHGUI_Preferences_ColorDlg *aDlg =
+                new SMESHGUI_Preferences_ColorDlg( SMESHGUI::GetSMESHGUI() );
+              aDlg->SetColor(1, c);
+              aDlg->SetColor(2, e);
+              aDlg->SetColor(3, n);
+              aDlg->SetColor(4, b);
+              aDlg->SetIntValue(1, Edgewidth);
+              aDlg->SetIntValue(2, intValue);
+              aDlg->SetIntValue(3, int(Shrink*100.));
+              if(aDlg->exec()){
+                QColor color = aDlg->GetColor(1);
+                QColor edgecolor = aDlg->GetColor(2);
+                QColor nodecolor = aDlg->GetColor(3);
+                QColor backfacecolor = aDlg->GetColor(4);
+                /* actor color and backface color */
+                anActor->SetSufaceColor(vtkFloatingPointType (color.red()) / 255.,
+                                        vtkFloatingPointType (color.green()) / 255.,
+                                        vtkFloatingPointType (color.blue()) / 255.);
+                anActor->SetBackSufaceColor(vtkFloatingPointType (backfacecolor.red()) / 255.,
+                                            vtkFloatingPointType (backfacecolor.green()) / 255.,
+                                            vtkFloatingPointType (backfacecolor.blue()) / 255.);
+
+                /* edge color */
+                anActor->SetEdgeColor(vtkFloatingPointType (edgecolor.red()) / 255.,
+                                      vtkFloatingPointType (edgecolor.green()) / 255.,
+                                      vtkFloatingPointType (edgecolor.blue()) / 255.);
+
+                /* Shrink factor and size edges */
+                anActor->SetShrinkFactor(aDlg->GetIntValue(3) / 100.);
+                anActor->SetLineWidth(aDlg->GetIntValue(1));
+
+                /* Nodes color and size */
+                anActor->SetNodeColor(vtkFloatingPointType (nodecolor.red()) / 255.,
+                                      vtkFloatingPointType (nodecolor.green()) / 255.,
+                                      vtkFloatingPointType (nodecolor.blue()) / 255.);
+                anActor->SetNodeSize(aDlg->GetIntValue(2));
+
+                SMESH::SMESH_GroupBase_var aGroupObject = SMESH::IObjectToInterface<SMESH::SMESH_GroupBase>(IObject);
+                if( !aGroupObject->_is_nil() )
+                {
+                  SMESH::ElementType anElementType = aGroupObject->GetType();
+                  QColor aColor;
+                  switch( anElementType )
+                  {
+                    case SMESH::NODE: aColor = nodecolor; break;
+                    case SMESH::EDGE: aColor = edgecolor; break;
+                    default: aColor = color; break;
+                  }
+
+                  SALOMEDS::Color aGroupColor;
+                  aGroupColor.R = (float)aColor.red() / 255.0;
+                  aGroupColor.G = (float)aColor.green() / 255.0;
+                  aGroupColor.B = (float)aColor.blue() / 255.0;
+                  aGroupObject->SetColor( aGroupColor );
+                }
+
+                delete aDlg;
+              }
+              break;
+            }}
+          }
+        }
       }
       SMESH::RepaintCurrentView();
     }
     if( !selected.IsEmpty() ){
       Handle(SALOME_InteractiveObject) anIO = selected.First();
       if(!anIO.IsNull()){
-       QString aTitle;
-       SMESH_Actor::eControl aControl = SMESH_Actor::eNone;
-       if(SMESH_Actor *anActor = SMESH::FindActorByEntry(anIO->getEntry())){
-         switch ( theCommandID ){
-         case 6001:
-           aTitle = QObject::tr( "LENGTH_EDGES" );
-           aControl = SMESH_Actor::eLength;
-           break;
-         case 6018:
-           aTitle = QObject::tr( "LENGTH2D_EDGES" );
-           aControl = SMESH_Actor::eLength2D;
-           break;
-         case 6002:
-           aTitle = QObject::tr( "FREE_EDGES" );
-           aControl = SMESH_Actor::eFreeEdges;
-           break;
-         case 6003:
-           aTitle = QObject::tr( "FREE_BORDERS" );
-           aControl = SMESH_Actor::eFreeBorders;
-           break;
-         case 6004:
-           aTitle = QObject::tr( "MULTI_BORDERS" );
-           aControl = SMESH_Actor::eMultiConnection;
-           break;
-         case 6005:
-           aTitle = QObject::tr( "FREE_NODES" );
-           aControl = SMESH_Actor::eFreeNodes;
-           break;
-         case 6019:
-           aTitle = QObject::tr( "MULTI2D_BORDERS" );
-           aControl = SMESH_Actor::eMultiConnection2D;
-           break;
-         case 6011:
-           aTitle = QObject::tr( "AREA_ELEMENTS" );
-           aControl = SMESH_Actor::eArea;
-           break;
-         case 6012:
-           aTitle = QObject::tr( "TAPER_ELEMENTS" );
-           aControl = SMESH_Actor::eTaper;
-           break;
-         case 6013:
-           aTitle = QObject::tr( "ASPECTRATIO_ELEMENTS" );
-           aControl = SMESH_Actor::eAspectRatio;
-           break;
-         case 6017:
-           aTitle = QObject::tr( "ASPECTRATIO_3D_ELEMENTS" );
-           aControl = SMESH_Actor::eAspectRatio3D;
-           break;
-         case 6014:
-           aTitle = QObject::tr( "MINIMUMANGLE_ELEMENTS" );
-           aControl = SMESH_Actor::eMinimumAngle;
-           break;
-         case 6015:
-           aTitle = QObject::tr( "WARP_ELEMENTS" );
-           aControl = SMESH_Actor::eWarping;
-           break;
-         case 6016:
-           aTitle = QObject::tr( "SKEW_ELEMENTS" );
-           aControl = SMESH_Actor::eSkew;
-           break;
-         case 6009:
-           aTitle = QObject::tr( "SMESH_VOLUME" );
-           aControl = SMESH_Actor::eVolume3D;
-           break;
-         case 6021:
-           aTitle = QObject::tr( "FREE_FACES" );
-           aControl = SMESH_Actor::eFreeFaces;
-           break;
-         }
-         anActor->SetControlMode(aControl);
-         anActor->GetScalarBarActor()->SetTitle(aTitle.toLatin1().data());
-         SMESH::RepaintCurrentView();
-       }
+        QString aTitle;
+        SMESH_Actor::eControl aControl = SMESH_Actor::eNone;
+        if(SMESH_Actor *anActor = SMESH::FindActorByEntry(anIO->getEntry())){
+          switch ( theCommandID ){
+          case 6001:
+            aTitle = QObject::tr( "LENGTH_EDGES" );
+            aControl = SMESH_Actor::eLength;
+            break;
+          case 6018:
+            aTitle = QObject::tr( "LENGTH2D_EDGES" );
+            aControl = SMESH_Actor::eLength2D;
+            break;
+          case 6002:
+            aTitle = QObject::tr( "FREE_EDGES" );
+            aControl = SMESH_Actor::eFreeEdges;
+            break;
+          case 6003:
+            aTitle = QObject::tr( "FREE_BORDERS" );
+            aControl = SMESH_Actor::eFreeBorders;
+            break;
+          case 6004:
+            aTitle = QObject::tr( "MULTI_BORDERS" );
+            aControl = SMESH_Actor::eMultiConnection;
+            break;
+          case 6005:
+            aTitle = QObject::tr( "FREE_NODES" );
+            aControl = SMESH_Actor::eFreeNodes;
+            break;
+          case 6019:
+            aTitle = QObject::tr( "MULTI2D_BORDERS" );
+            aControl = SMESH_Actor::eMultiConnection2D;
+            break;
+          case 6011:
+            aTitle = QObject::tr( "AREA_ELEMENTS" );
+            aControl = SMESH_Actor::eArea;
+            break;
+          case 6012:
+            aTitle = QObject::tr( "TAPER_ELEMENTS" );
+            aControl = SMESH_Actor::eTaper;
+            break;
+          case 6013:
+            aTitle = QObject::tr( "ASPECTRATIO_ELEMENTS" );
+            aControl = SMESH_Actor::eAspectRatio;
+            break;
+          case 6017:
+            aTitle = QObject::tr( "ASPECTRATIO_3D_ELEMENTS" );
+            aControl = SMESH_Actor::eAspectRatio3D;
+            break;
+          case 6014:
+            aTitle = QObject::tr( "MINIMUMANGLE_ELEMENTS" );
+            aControl = SMESH_Actor::eMinimumAngle;
+            break;
+          case 6015:
+            aTitle = QObject::tr( "WARP_ELEMENTS" );
+            aControl = SMESH_Actor::eWarping;
+            break;
+          case 6016:
+            aTitle = QObject::tr( "SKEW_ELEMENTS" );
+            aControl = SMESH_Actor::eSkew;
+            break;
+          case 6009:
+            aTitle = QObject::tr( "SMESH_VOLUME" );
+            aControl = SMESH_Actor::eVolume3D;
+            break;
+          case 6021:
+            aTitle = QObject::tr( "FREE_FACES" );
+            aControl = SMESH_Actor::eFreeFaces;
+            break;
+          }
+          anActor->SetControlMode(aControl);
+          anActor->GetScalarBarActor()->SetTitle(aTitle.toLatin1().data());
+          SMESH::RepaintCurrentView();
+        }
       }
     }
   }
 
 
   bool CheckOIType(const Handle(SALOME_InteractiveObject) & theIO,
-                  MeshObjectType                           theType,
-                  const QString                            theInTypeName,
-                  QString &                                theOutTypeName)
+                   MeshObjectType                           theType,
+                   const QString                            theInTypeName,
+                   QString &                                theOutTypeName)
   {
     SMESH_TypeFilter aTypeFilter( theType );
     QString entry;
       _PTR(SComponent) aSComp = aSObj->GetFatherComponent();
       CORBA::String_var anID = aSComp->GetID().c_str();
       if (!strcmp(anID.in(),theIO->getEntry()))
-       return "Component";
+        return "Component";
     }
 
     QString aTypeName;
     if (
-       CheckOIType ( theIO, HYPOTHESIS,    "Hypothesis", aTypeName ) ||
-       CheckOIType ( theIO, ALGORITHM,     "Algorithm",  aTypeName ) ||
-       CheckOIType ( theIO, MESH,          "Mesh",       aTypeName ) ||
-       CheckOIType ( theIO, SUBMESH,       "SubMesh",    aTypeName ) ||
-       CheckOIType ( theIO, GROUP,         "Group",      aTypeName )
-       )
+        CheckOIType ( theIO, HYPOTHESIS,    "Hypothesis", aTypeName ) ||
+        CheckOIType ( theIO, ALGORITHM,     "Algorithm",  aTypeName ) ||
+        CheckOIType ( theIO, MESH,          "Mesh",       aTypeName ) ||
+        CheckOIType ( theIO, SUBMESH,       "SubMesh",    aTypeName ) ||
+        CheckOIType ( theIO, GROUP,         "Group",      aTypeName )
+        )
       return aTypeName;
 
     return "NoType";
     SALOME_ListIteratorOfListIO It(selected);
     for ( ; It.More(); It.Next())
       {
-       Handle(SALOME_InteractiveObject) IObject = It.Value();
-       QString Type = CheckTypeObject(IObject);
-       if (Type.compare(RefType) != 0)
-         return "Heterogeneous Selection";
+        Handle(SALOME_InteractiveObject) IObject = It.Value();
+        QString Type = CheckTypeObject(IObject);
+        if (Type.compare(RefType) != 0)
+          return "Heterogeneous Selection";
       }
 
     return RefType;
       QString cur = anIO->getComponentDataType();
       _PTR(SObject) aSO = aStudy->FindObjectID(anIO->getEntry());
       if (aSO) {
-       // check if object is reference
-       _PTR(SObject) aRefSObj;
-       aNameList.append("\n    - ");
-       if ( aSO->ReferencedObject( aRefSObj ) ) {
-         QString aRefName = QString::fromStdString ( aRefSObj->GetName() );
-         aNameList.append( aRefName );
-         cur = QString::fromStdString ( aRefSObj->GetFatherComponent()->ComponentDataType() );
-       }
-       else
-         aNameList.append(anIO->getName());
-       objectCount++;
+        // check if object is reference
+        _PTR(SObject) aRefSObj;
+        aNameList.append("\n    - ");
+        if ( aSO->ReferencedObject( aRefSObj ) ) {
+          QString aRefName = QString::fromStdString ( aRefSObj->GetName() );
+          aNameList.append( aRefName );
+          cur = QString::fromStdString ( aRefSObj->GetFatherComponent()->ComponentDataType() );
+        }
+        else
+          aNameList.append(anIO->getName());
+        objectCount++;
       }
 
       if( aParentComponent.isNull() )
 
     if ( aParentComponent != SMESHGUI::GetSMESHGUI()->name() )  {
       SUIT_MessageBox::warning( SMESHGUI::desktop(),
-                               QObject::tr("ERR_ERROR"),
-                               QObject::tr("NON_SMESH_OBJECTS_SELECTED").arg( SMESHGUI::GetSMESHGUI()->moduleName() ) );
+                                QObject::tr("ERR_ERROR"),
+                                QObject::tr("NON_SMESH_OBJECTS_SELECTED").arg( SMESHGUI::GetSMESHGUI()->moduleName() ) );
       return;
     }
     // VSR 17/11/04: check if all objects selected belong to SMESH component <-- finish
     if (SUIT_MessageBox::warning
-       (SMESHGUI::desktop(),
-        QObject::tr("SMESH_WRN_WARNING"),
-        QObject::tr("SMESH_REALLY_DELETE").arg( objectCount ).arg( aNameList ),
-        SUIT_MessageBox::Yes | SUIT_MessageBox::No,
-        SUIT_MessageBox::Yes) != SUIT_MessageBox::Yes)
+        (SMESHGUI::desktop(),
+         QObject::tr("SMESH_WRN_WARNING"),
+         QObject::tr("SMESH_REALLY_DELETE").arg( objectCount ).arg( aNameList ),
+         SUIT_MessageBox::Yes | SUIT_MessageBox::No,
+         SUIT_MessageBox::Yes) != SUIT_MessageBox::Yes)
       return;
 
     SalomeApp_Application* anApp = dynamic_cast<SalomeApp_Application*>( SUIT_Session::session()->activeApplication() );
     for( ; It.More(); It.Next()){ // loop on selected IO's
       Handle(SALOME_InteractiveObject) IObject = It.Value();
       if(IObject->hasEntry()) {
-       _PTR(SObject) aSO = aStudy->FindObjectID(IObject->getEntry());
-
-       // disable removal of "SMESH" component object
-       if(aSO->FindAttribute(anAttr, "AttributeIOR")){
-         anIOR = anAttr;
-         if ( engineIOR() == anIOR->Value().c_str() )
-           continue;
-       }
-       //Check the referenced object
-       _PTR(SObject) aRefSObject;
-       if ( aSO && aSO->ReferencedObject( aRefSObject ) )
-         aSO = aRefSObject; // Delete main Object instead of reference
+        _PTR(SObject) aSO = aStudy->FindObjectID(IObject->getEntry());
+
+        // disable removal of "SMESH" component object
+        if(aSO->FindAttribute(anAttr, "AttributeIOR")){
+          anIOR = anAttr;
+          if ( engineIOR() == anIOR->Value().c_str() )
+            continue;
+        }
+        //Check the referenced object
+        _PTR(SObject) aRefSObject;
+        if ( aSO && aSO->ReferencedObject( aRefSObject ) )
+          aSO = aRefSObject; // Delete main Object instead of reference
 
         // put the whole hierarchy of sub-objects of the selected SO into a list and
         // then treat them all starting from the deepest objects (at list back)
           std::string anEntry = SO->GetID();
 
           /** Erase graphical object **/
-         if(SO->FindAttribute(anAttr, "AttributeIOR")){
-           QVector<SUIT_ViewWindow*> aViews = vm->getViews();
-           for(int i = 0; i < nbSf; i++){
-             SUIT_ViewWindow *sf = aViews[i];
-             if(SMESH_Actor* anActor = SMESH::FindActorByEntry(sf,anEntry.c_str())){
-               SMESH::RemoveActor(sf,anActor);
-             }
-           }
-         }
+          if(SO->FindAttribute(anAttr, "AttributeIOR")){
+            QVector<SUIT_ViewWindow*> aViews = vm->getViews();
+            for(int i = 0; i < nbSf; i++){
+              SUIT_ViewWindow *sf = aViews[i];
+              if(SMESH_Actor* anActor = SMESH::FindActorByEntry(sf,anEntry.c_str())){
+                SMESH::RemoveActor(sf,anActor);
+              }
+            }
+          }
 
           /** Remove an object from data structures **/
           SMESH::SMESH_GroupBase_var aGroup = SMESH::SMESH_GroupBase::_narrow( SMESH::SObjectToObject( SO ));
               //op->finish();
             }
           }
-       } /* listSO back loop */
+        } /* listSO back loop */
       } /* IObject->hasEntry() */
     } /* more/next */
     aStudyBuilder->CommitCommand();
@@ -1180,7 +1180,7 @@ SMESHGUI* SMESHGUI::GetSMESHGUI()
     {
       _PTR(Study) aStudy = study->studyDS();
       if ( aStudy )
-       GetSMESHGen()->SetCurrentStudy( _CAST(Study,aStudy)->GetStudy() );
+        GetSMESHGen()->SetCurrentStudy( _CAST(Study,aStudy)->GetStudy() );
     }
   }
 
@@ -1322,8 +1322,8 @@ static int isStudyLocked(_PTR(Study) theStudy){
 static bool checkLock(_PTR(Study) theStudy) {
   if (isStudyLocked(theStudy)) {
     SUIT_MessageBox::warning( SMESHGUI::desktop(),
-                             QObject::tr("WRN_WARNING"),
-                             QObject::tr("WRN_STUDY_LOCKED") );
+                              QObject::tr("WRN_WARNING"),
+                              QObject::tr("WRN_STUDY_LOCKED") );
     return true;
   }
   return false;
@@ -1365,13 +1365,13 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
 
   //QAction* act = action( theCommandID );
 
-  switch (theCommandID)        {
-  case 33:                                     // DELETE
+  switch (theCommandID) {
+  case 33:                                      // DELETE
     if(checkLock(aStudy)) break;
     OnEditDelete();
     break;
 
-  case 113:                                    // IMPORT
+  case 113:                                     // IMPORT
   case 112:
   case 111:
     {
@@ -1399,7 +1399,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
       break;
     }
 
-  case 122:                                    // EXPORT MED
+  case 122:                                     // EXPORT MED
   case 121:
   case 123:
   case 124:
@@ -1412,7 +1412,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
       break;
     }
 
-  case 200:                                    // SCALAR BAR
+  case 200:                                     // SCALAR BAR
     {
       LightApp_SelectionMgr *aSel = SMESHGUI::selectionMgr();
       SALOME_ListIO selected;
@@ -1420,12 +1420,12 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
         aSel->selectedObjects( selected );
 
       if( selected.Extent() ) {
-       Handle(SALOME_InteractiveObject) anIO = selected.First();
-       if( anIO->hasEntry() ) {
-         if( SMESH_Actor* anActor = SMESH::FindActorByEntry( anIO->getEntry() ) ) {
-           anActor->SetControlMode( SMESH_Actor::eNone );
-         }
-       }
+        Handle(SALOME_InteractiveObject) anIO = selected.First();
+        if( anIO->hasEntry() ) {
+          if( SMESH_Actor* anActor = SMESH::FindActorByEntry( anIO->getEntry() ) ) {
+            anActor->SetControlMode( SMESH_Actor::eNone );
+          }
+        }
       }
       break;
     }
@@ -1479,16 +1479,16 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
       SALOME_ListIteratorOfListIO it(selected);
       for( ; it.More(); it.Next()) {
         Handle(SALOME_InteractiveObject) anIObject = it.Value();
-       if(anIObject->hasEntry()) {
-         if(SMESH_Actor *anActor = SMESH::FindActorByEntry(anIObject->getEntry())){
-           anActor->SetFacesOriented( !anActor->GetFacesOriented() );
-         }
-       }
+        if(anIObject->hasEntry()) {
+          if(SMESH_Actor *anActor = SMESH::FindActorByEntry(anIObject->getEntry())){
+            anActor->SetFacesOriented( !anActor->GetFacesOriented() );
+          }
+        }
       }
       break;
     }
 
-  case 214:                                    // UPDATE
+  case 214:                                     // UPDATE
     {
       if(checkLock(aStudy)) break;
       try {
@@ -1511,15 +1511,15 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
       break;
     }
 
-  case 300:                                    // ERASE
-  case 301:                                    // DISPLAY
-  case 302:                                    // DISPLAY ONLY
+  case 300:                                     // ERASE
+  case 301:                                     // DISPLAY
+  case 302:                                     // DISPLAY ONLY
     {
       SMESH::EDisplaing anAction;
       switch (theCommandID) {
-      case 300:        anAction = SMESH::eErase; break;
-      case 301:        anAction = SMESH::eDisplay; break;
-      case 302:        anAction = SMESH::eDisplayOnly; break;
+      case 300: anAction = SMESH::eErase; break;
+      case 301: anAction = SMESH::eDisplay; break;
+      case 302: anAction = SMESH::eDisplayOnly; break;
       }
 
       LightApp_SelectionMgr *aSel = SMESHGUI::selectionMgr();
@@ -1528,7 +1528,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
         aSel->selectedObjects( sel_objects );
 
       if( theCommandID==302 )
-       startOperation( myEraseAll );
+        startOperation( myEraseAll );
 
       extractContainers( sel_objects, to_process );
 
@@ -1559,28 +1559,28 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
       }
 
       if (anAction == SMESH::eErase) {
-       SALOME_ListIO l1;
-       aSel->setSelectedObjects( l1 );
+        SALOME_ListIO l1;
+        aSel->setSelectedObjects( l1 );
       }
       else
-       aSel->setSelectedObjects( to_process );
+        aSel->setSelectedObjects( to_process );
 
       break;
     }
 
-  case 4000:                                   // NODES
+  case 4000:                                    // NODES
     {
       if(checkLock(aStudy)) break;
 
       if ( vtkwnd ) {
-       EmitSignalDeactivateDialog();
+        EmitSignalDeactivateDialog();
 
-       ( new SMESHGUI_NodesDlg( this ) )->show();
+        ( new SMESHGUI_NodesDlg( this ) )->show();
       }
       else {
-       SUIT_MessageBox::warning(desktop(),
-                                tr("SMESH_WRN_WARNING"),
-                                tr("SMESH_WRN_VIEWER_VTK"));
+        SUIT_MessageBox::warning(desktop(),
+                                 tr("SMESH_WRN_WARNING"),
+                                 tr("SMESH_WRN_VIEWER_VTK"));
       }
       break;
     }
@@ -1595,12 +1595,12 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
     break;
   }
 
-  case 406:                                    // MOVE NODE
+  case 406:                                     // MOVE NODE
     {
       if ( !vtkwnd )
       {
         SUIT_MessageBox::warning( desktop(), tr( "SMESH_WRN_WARNING" ),
-                                 tr( "NOT_A_VTK_VIEWER" ) );
+                                  tr( "NOT_A_VTK_VIEWER" ) );
         break;
       }
 
@@ -1609,9 +1609,9 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
       break;
     }
 
-  case 701:                                    // COMPUTE MESH
-  case 711:                                    // PRECOMPUTE MESH
-  case 712:                                    // EVALUATE MESH
+  case 701:                                     // COMPUTE MESH
+  case 711:                                     // PRECOMPUTE MESH
+  case 712:                                     // EVALUATE MESH
     {
       if (checkLock(aStudy)) break;
       startOperation( theCommandID );
@@ -1637,7 +1637,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
       if ( !vtkwnd )
       {
         SUIT_MessageBox::warning( desktop(), tr( "SMESH_WRN_WARNING" ),
-                                 tr( "NOT_A_VTK_VIEWER" ) );
+                                  tr( "NOT_A_VTK_VIEWER" ) );
         break;
       }
 
@@ -1667,7 +1667,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
       if ( !vtkwnd )
       {
         SUIT_MessageBox::warning( desktop(), tr( "SMESH_WRN_WARNING" ),
-                                 tr( "NOT_A_VTK_VIEWER" ) );
+                                  tr( "NOT_A_VTK_VIEWER" ) );
         break;
       }
 
@@ -1690,12 +1690,12 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
     {
       if(checkLock(aStudy)) break;
       if( vtkwnd ) {
-       EmitSignalDeactivateDialog();
-       ( new SMESHGUI_SmoothingDlg( this ) )->show();
+        EmitSignalDeactivateDialog();
+        ( new SMESHGUI_SmoothingDlg( this ) )->show();
       }
       else {
-       SUIT_MessageBox::warning(desktop(),
-                                tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
+        SUIT_MessageBox::warning(desktop(),
+                                 tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
       }
       break;
     }
@@ -1703,11 +1703,11 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
     {
       if (checkLock(aStudy)) break;
       if (vtkwnd) {
-       EmitSignalDeactivateDialog();
-       ( new SMESHGUI_ExtrusionDlg ( this ) )->show();
+        EmitSignalDeactivateDialog();
+        ( new SMESHGUI_ExtrusionDlg ( this ) )->show();
       } else {
-       SUIT_MessageBox::warning(desktop(),
-                                tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
+        SUIT_MessageBox::warning(desktop(),
+                                 tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
       }
       break;
     }
@@ -1715,12 +1715,12 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
     {
       if(checkLock(aStudy)) break;
       if( vtkwnd ) {
-       EmitSignalDeactivateDialog();
-       ( new SMESHGUI_RevolutionDlg( this ) )->show();
+        EmitSignalDeactivateDialog();
+        ( new SMESHGUI_RevolutionDlg( this ) )->show();
       }
       else {
-       SUIT_MessageBox::warning(desktop(),
-                                tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
+        SUIT_MessageBox::warning(desktop(),
+                                 tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
       }
       break;
     }
@@ -1734,8 +1734,8 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
         ( new SMESHGUI_MeshPatternDlg( this ) )->show();
       }
       else {
-       SUIT_MessageBox::warning(desktop(),
-                                tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
+        SUIT_MessageBox::warning(desktop(),
+                                 tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
       }
       break;
     }
@@ -1743,11 +1743,11 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
     {
       if (checkLock(aStudy)) break;
       if (vtkwnd) {
-       EmitSignalDeactivateDialog();
-       ( new SMESHGUI_ExtrusionAlongPathDlg( this ) )->show();
+        EmitSignalDeactivateDialog();
+        ( new SMESHGUI_ExtrusionAlongPathDlg( this ) )->show();
       } else {
-       SUIT_MessageBox::warning(desktop(),
-                                tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
+        SUIT_MessageBox::warning(desktop(),
+                                 tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
       }
       break;
     }
@@ -1756,12 +1756,12 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
     startOperation( 417 );
       /*      if (checkLock(aStudy)) break;
       if (vtkwnd) {
-       EmitSignalDeactivateDialog();
-       new SMESHGUI_ConvToQuadDlg();
+        EmitSignalDeactivateDialog();
+        new SMESHGUI_ConvToQuadDlg();
       } else {
-       SUIT_MessageBox::warning(desktop(),
+        SUIT_MessageBox::warning(desktop(),
                                tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
-                              }*/
+                               }*/
       break;
     }
   case 418: // create 2D mesh from 3D
@@ -1779,7 +1779,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
       if ( !vtkwnd )
       {
         SUIT_MessageBox::warning( desktop(), tr( "SMESH_WRN_WARNING" ),
-                                 tr( "NOT_A_VTK_VIEWER" ) );
+                                  tr( "NOT_A_VTK_VIEWER" ) );
         break;
       }
 
@@ -1794,7 +1794,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
 
       int nbSel = selected.Extent();
       if (nbSel == 1) {
-       // check if mesh is selected
+        // check if mesh is selected
         aMesh = SMESH::GetMeshByIO( selected.First() );
       }
       SMESHGUI_GroupDlg *aDlg = new SMESHGUI_GroupDlg( this, aMesh);
@@ -1807,7 +1807,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
       if ( !vtkwnd )
       {
         SUIT_MessageBox::warning( desktop(), tr( "SMESH_WRN_WARNING" ),
-                                 tr( "NOT_A_VTK_VIEWER" ) );
+                                  tr( "NOT_A_VTK_VIEWER" ) );
         break;
       }
 
@@ -1821,52 +1821,52 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
 
       int nbSel = selected.Extent();
       if (nbSel == 1) {
-       // check if submesh is selected
-       Handle(SALOME_InteractiveObject) IObject = selected.First();
-       if (IObject->hasEntry()) {
-         _PTR(SObject) aSObj = aStudy->FindObjectID(IObject->getEntry());
-         if( aSObj ) {
-           SMESH::SMESH_subMesh_var aSubMesh = SMESH::SMESH_subMesh::_narrow( SMESH::SObjectToObject( aSObj ) );
-           if (!aSubMesh->_is_nil()) {
-             try {
-               SMESH::SMESH_Mesh_var aMesh = aSubMesh->GetFather();
-               // get submesh elements list by types
-               SMESH::long_array_var aNodes = aSubMesh->GetElementsByType(SMESH::NODE);
-               SMESH::long_array_var aEdges = aSubMesh->GetElementsByType(SMESH::EDGE);
-               SMESH::long_array_var aFaces = aSubMesh->GetElementsByType(SMESH::FACE);
-               SMESH::long_array_var aVolumes = aSubMesh->GetElementsByType(SMESH::VOLUME);
-               // create group for each type o elements
-               QString aName = IObject->getName();
-               if (aNodes->length() > 0) {
-                 SMESH::SMESH_Group_var aGroup = SMESH::AddGroup(aMesh, SMESH::NODE, aName + "_Nodes");
-                 aGroup->Add(aNodes.inout());
-               }
-               if (aEdges->length() > 0) {
-                 SMESH::SMESH_Group_var aGroup = SMESH::AddGroup(aMesh, SMESH::EDGE, aName + "_Edges");
-                 aGroup->Add(aEdges.inout());
-               }
-               if (aFaces->length() > 0) {
-                 SMESH::SMESH_Group_var aGroup = SMESH::AddGroup(aMesh, SMESH::FACE, aName + "_Faces");
-                 aGroup->Add(aFaces.inout());
-               }
-               if (aVolumes->length() > 0) {
-                 SMESH::SMESH_Group_var aGroup = SMESH::AddGroup(aMesh, SMESH::VOLUME, aName + "_Volumes");
-                 aGroup->Add(aVolumes.inout());
-               }
-               updateObjBrowser();
-
-             }
+        // check if submesh is selected
+        Handle(SALOME_InteractiveObject) IObject = selected.First();
+        if (IObject->hasEntry()) {
+          _PTR(SObject) aSObj = aStudy->FindObjectID(IObject->getEntry());
+          if( aSObj ) {
+            SMESH::SMESH_subMesh_var aSubMesh = SMESH::SMESH_subMesh::_narrow( SMESH::SObjectToObject( aSObj ) );
+            if (!aSubMesh->_is_nil()) {
+              try {
+                SMESH::SMESH_Mesh_var aMesh = aSubMesh->GetFather();
+                // get submesh elements list by types
+                SMESH::long_array_var aNodes = aSubMesh->GetElementsByType(SMESH::NODE);
+                SMESH::long_array_var aEdges = aSubMesh->GetElementsByType(SMESH::EDGE);
+                SMESH::long_array_var aFaces = aSubMesh->GetElementsByType(SMESH::FACE);
+                SMESH::long_array_var aVolumes = aSubMesh->GetElementsByType(SMESH::VOLUME);
+                // create group for each type o elements
+                QString aName = IObject->getName();
+                if (aNodes->length() > 0) {
+                  SMESH::SMESH_Group_var aGroup = SMESH::AddGroup(aMesh, SMESH::NODE, aName + "_Nodes");
+                  aGroup->Add(aNodes.inout());
+                }
+                if (aEdges->length() > 0) {
+                  SMESH::SMESH_Group_var aGroup = SMESH::AddGroup(aMesh, SMESH::EDGE, aName + "_Edges");
+                  aGroup->Add(aEdges.inout());
+                }
+                if (aFaces->length() > 0) {
+                  SMESH::SMESH_Group_var aGroup = SMESH::AddGroup(aMesh, SMESH::FACE, aName + "_Faces");
+                  aGroup->Add(aFaces.inout());
+                }
+                if (aVolumes->length() > 0) {
+                  SMESH::SMESH_Group_var aGroup = SMESH::AddGroup(aMesh, SMESH::VOLUME, aName + "_Volumes");
+                  aGroup->Add(aVolumes.inout());
+                }
+                updateObjBrowser();
+
+              }
               catch(const SALOME::SALOME_Exception & S_ex){
-               SalomeApp_Tools::QtCatchCorbaException(S_ex);
-             }
-           }
-         }
-       }
+                SalomeApp_Tools::QtCatchCorbaException(S_ex);
+              }
+            }
+          }
+        }
       }
       else if(nbSel==0) {
         SUIT_MessageBox::warning(desktop(),
-                                tr("SMESH_WRN_WARNING"),
-                                tr("SMESH_WRN_NO_AVAILABLE_DATA"));
+                                 tr("SMESH_WRN_WARNING"),
+                                 tr("SMESH_WRN_NO_AVAILABLE_DATA"));
       }
       break;
     }
@@ -1876,7 +1876,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
       if ( !vtkwnd )
       {
         SUIT_MessageBox::warning( desktop(), tr( "SMESH_WRN_WARNING" ),
-                                 tr( "NOT_A_VTK_VIEWER" ) );
+                                  tr( "NOT_A_VTK_VIEWER" ) );
         break;
       }
 
@@ -1895,16 +1895,16 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
         SMESH::SMESH_GroupBase_var aGroup =
           SMESH::IObjectToInterface<SMESH::SMESH_GroupBase>(It.Value());
         if (!aGroup->_is_nil()) {
-         nbSelectedGroups++;
+          nbSelectedGroups++;
           SMESHGUI_GroupDlg *aDlg = new SMESHGUI_GroupDlg( this, aGroup);
           aDlg->show();
-       }
+        }
       }
       if (nbSelectedGroups == 0)
-       {
-         SMESHGUI_GroupDlg *aDlg = new SMESHGUI_GroupDlg( this, SMESH::SMESH_GroupBase::_nil());
-         aDlg->show();
-       }
+        {
+          SMESHGUI_GroupDlg *aDlg = new SMESHGUI_GroupDlg( this, SMESH::SMESH_GroupBase::_nil());
+          aDlg->show();
+        }
       break;
     }
 
@@ -1912,8 +1912,8 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
     {
       if(checkLock(aStudy)) break;
       if (myState == 800) {
-       SMESHGUI_GroupDlg *aDlg = (SMESHGUI_GroupDlg*) myActiveDialogBox;
-       if (aDlg) aDlg->onAdd();
+        SMESHGUI_GroupDlg *aDlg = (SMESHGUI_GroupDlg*) myActiveDialogBox;
+        if (aDlg) aDlg->onAdd();
       }
       break;
     }
@@ -1922,8 +1922,8 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
     {
       if(checkLock(aStudy)) break;
       if (myState == 800) {
-       SMESHGUI_GroupDlg *aDlg = (SMESHGUI_GroupDlg*) myActiveDialogBox;
-       if (aDlg) aDlg->onRemove();
+        SMESHGUI_GroupDlg *aDlg = (SMESHGUI_GroupDlg*) myActiveDialogBox;
+        if (aDlg) aDlg->onRemove();
       }
       break;
     }
@@ -1933,7 +1933,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
       if ( !vtkwnd )
       {
         SUIT_MessageBox::warning( desktop(), tr( "SMESH_WRN_WARNING" ),
-                                 tr( "NOT_A_VTK_VIEWER" ) );
+                                  tr( "NOT_A_VTK_VIEWER" ) );
         break;
       }
 
@@ -1953,7 +1953,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
         if (!aGroup->_is_nil()) {
           SMESHGUI_GroupDlg *aDlg = new SMESHGUI_GroupDlg( this, aGroup, true );
           aDlg->show();
-       }
+        }
       }
       break;
     }
@@ -1965,7 +1965,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
       if ( !vtkwnd )
       {
         SUIT_MessageBox::warning( desktop(), tr( "SMESH_WRN_WARNING" ),
-                                 tr( "NOT_A_VTK_VIEWER" ) );
+                                  tr( "NOT_A_VTK_VIEWER" ) );
         break;
       }
 
@@ -2004,7 +2004,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
       if ( !vtkwnd )
       {
         SUIT_MessageBox::warning( desktop(), tr( "SMESH_WRN_WARNING" ),
-                                 tr( "NOT_A_VTK_VIEWER" ) );
+                                  tr( "NOT_A_VTK_VIEWER" ) );
         break;
       }
 
@@ -2017,7 +2017,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
       break;
     }
 
-  case 900:                                    // MESH INFOS
+  case 900:                                     // MESH INFOS
     {
       EmitSignalDeactivateDialog();
       LightApp_SelectionMgr *aSel = SMESHGUI::selectionMgr();
@@ -2029,8 +2029,8 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
         SALOME_ListIO IOs;
         SALOME_ListIteratorOfListIO It (selected);
         for ( ; It.More(); It.Next() ) {
-         IOs.Clear(); IOs.Append( It.Value() );
-         aSel->setSelectedObjects( IOs );
+          IOs.Clear(); IOs.Append( It.Value() );
+          aSel->setSelectedObjects( IOs );
           ( new SMESHGUI_MeshInfosDlg( this ) )->show();
         }
         // restore selection
@@ -2041,7 +2041,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
       break;
     }
 
-  case 902:                                    // STANDARD MESH INFOS
+  case 902:                                     // STANDARD MESH INFOS
     {
       EmitSignalDeactivateDialog();
       LightApp_SelectionMgr *aSel = SMESHGUI::selectionMgr();
@@ -2053,27 +2053,27 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
         SALOME_ListIO IOs;
         SALOME_ListIteratorOfListIO It (selected);
         for ( ; It.More(); It.Next() ) {
-         IOs.Clear();
-         IOs.Append( It.Value() );
-         aSel->setSelectedObjects( IOs );
+          IOs.Clear();
+          IOs.Append( It.Value() );
+          aSel->setSelectedObjects( IOs );
           ( new SMESHGUI_StandardMeshInfosDlg( this ) )->show();
         }
         // restore selection
-       aSel->setSelectedObjects( selected );
+        aSel->setSelectedObjects( selected );
       }
       else
         ( new SMESHGUI_StandardMeshInfosDlg( this ) )->show();
       break;
     }
 
-  case 903:                                    // WHAT IS
+  case 903:                                     // WHAT IS
     {
       EmitSignalDeactivateDialog();
       ( new SMESHGUI_WhatIsDlg( this ) )->show();
       break;
     }
 
-  case 1100:                                   // EDIT HYPOTHESIS
+  case 1100:                                    // EDIT HYPOTHESIS
     {
       if(checkLock(aStudy)) break;
 
@@ -2086,7 +2086,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
 
       if (nbSel == 1) {
         Handle(SALOME_InteractiveObject) anIObject = selected.First();
-       SMESH::SMESH_Hypothesis_var aHypothesis = SMESH::IObjectToInterface<SMESH::SMESH_Hypothesis>(anIObject);
+        SMESH::SMESH_Hypothesis_var aHypothesis = SMESH::IObjectToInterface<SMESH::SMESH_Hypothesis>(anIObject);
 
         /* Look for all mesh objects that have this hypothesis affected in order to flag as ModifiedMesh */
         /* At end below '...->updateObjBrowser(true)' will change icon of mesh objects                   */
@@ -2108,7 +2108,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
       break;
     }
 
-  case 1101:                                   // RENAME
+  case 1101:                                    // RENAME
     {
       if ( checkLock( aStudy ) )
         break;
@@ -2148,14 +2148,14 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
               {
                 SMESHGUI::GetSMESHGen()->SetName(obj->GetIOR().c_str(), newName.toLatin1().data());
 
-               // update name of group object and its actor
-               SMESH::SMESH_GroupBase_var aGroupObject = SMESH::IObjectToInterface<SMESH::SMESH_GroupBase>(IObject);
-               if( !aGroupObject->_is_nil() )
-               {
-                 aGroupObject->SetName( newName.toLatin1().data() );
-                 if ( SMESH_Actor *anActor = SMESH::FindActorByEntry( IObject->getEntry() ) )
-                   anActor->setName( newName.toLatin1().data() );
-               }
+                // update name of group object and its actor
+                SMESH::SMESH_GroupBase_var aGroupObject = SMESH::IObjectToInterface<SMESH::SMESH_GroupBase>(IObject);
+                if( !aGroupObject->_is_nil() )
+                {
+                  aGroupObject->SetName( newName.toLatin1().data() );
+                  if ( SMESH_Actor *anActor = SMESH::FindActorByEntry( IObject->getEntry() ) )
+                    anActor->setName( newName.toLatin1().data() );
+                }
 
                 updateObjBrowser();
               }
@@ -2166,13 +2166,13 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
 
       if (!isAny) {
         SUIT_MessageBox::warning(desktop(),
-                                QObject::tr("SMESH_WRN_WARNING"),
-                                QObject::tr("SMESH_WRN_NO_APPROPRIATE_SELECTION"));
+                                 QObject::tr("SMESH_WRN_WARNING"),
+                                 QObject::tr("SMESH_WRN_NO_APPROPRIATE_SELECTION"));
       }
       break;
     }
 
-  case 1102:                                   // REMOVE HYPOTHESIS / ALGORITHMS
+  case 1102:                                    // REMOVE HYPOTHESIS / ALGORITHMS
     {
       if(checkLock(aStudy)) break;
       SUIT_OverrideCursor wc;
@@ -2184,8 +2184,8 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
 
       SALOME_ListIteratorOfListIO It(selected);
       for (int i = 0; It.More(); It.Next(), i++) {
-       Handle(SALOME_InteractiveObject) IObject = It.Value();
-       SMESH::RemoveHypothesisOrAlgorithmOnMesh(IObject);
+        Handle(SALOME_InteractiveObject) IObject = It.Value();
+        SMESH::RemoveHypothesisOrAlgorithmOnMesh(IObject);
       }
       SALOME_ListIO l1;
       aSel->setSelectedObjects( l1 );
@@ -2193,17 +2193,17 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
       break;
     }
 
-  case 4009:                                   // ELEM0D
-  case 4010:                                   // GEOM::EDGE
-  case 4021:                                   // TRIANGLE
-  case 4022:                                   // QUAD
-  case 4023:                                   // POLYGON
-  case 4031:                                   // TETRA
-  case 4032:                                   // HEXA
+  case 4009:                                    // ELEM0D
+  case 4010:                                    // GEOM::EDGE
+  case 4021:                                    // TRIANGLE
+  case 4022:                                    // QUAD
+  case 4023:                                    // POLYGON
+  case 4031:                                    // TETRA
+  case 4032:                                    // HEXA
     {
       if(checkLock(aStudy)) break;
       if ( vtkwnd ) {
-       EmitSignalDeactivateDialog();
+        EmitSignalDeactivateDialog();
         SMDSAbs_ElementType type    = SMDSAbs_Edge;
         int                 nbNodes = 2;
         switch (theCommandID) {
@@ -2215,32 +2215,32 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
           type = SMDSAbs_Face; nbNodes = 4; break;
         case 4031:                                      // TETRA
           type = SMDSAbs_Volume; nbNodes = 4; break;
-       case 4023:                                      // POLYGON
-         type = SMDSAbs_Face; nbNodes = 5; break;     // 5 - identificator for POLYGON
+        case 4023:                                      // POLYGON
+          type = SMDSAbs_Face; nbNodes = 5; break;     // 5 - identificator for POLYGON
         case 4032:                                      // HEXA
           type = SMDSAbs_Volume; nbNodes = 8; break;
-       case 4033:                                      // POLYHEDRE
-         type = SMDSAbs_Volume; nbNodes = 9; break; // 9 - identificator for POLYHEDRE
+        case 4033:                                      // POLYHEDRE
+          type = SMDSAbs_Volume; nbNodes = 9; break; // 9 - identificator for POLYHEDRE
         default:;
         }
-       ( new SMESHGUI_AddMeshElementDlg( this, type, nbNodes ) )->show();
+        ( new SMESHGUI_AddMeshElementDlg( this, type, nbNodes ) )->show();
       }
       else {
-       SUIT_MessageBox::warning(desktop(),
-                                tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
+        SUIT_MessageBox::warning(desktop(),
+                                 tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
       }
       break;
     }
-  case 4033:                                   // POLYHEDRON
+  case 4033:                                    // POLYHEDRON
     {
       if(checkLock(aStudy)) break;
       if ( vtkwnd ) {
-       EmitSignalDeactivateDialog();
-       ( new SMESHGUI_CreatePolyhedralVolumeDlg( this ) )->show();
+        EmitSignalDeactivateDialog();
+        ( new SMESHGUI_CreatePolyhedralVolumeDlg( this ) )->show();
       }
       else {
-       SUIT_MessageBox::warning(SMESHGUI::desktop(),
-                                tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
+        SUIT_MessageBox::warning(SMESHGUI::desktop(),
+                                 tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
       }
       break;
     }
@@ -2254,60 +2254,60 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
     {
       if(checkLock(aStudy)) break;
       if ( vtkwnd ) {
-       EmitSignalDeactivateDialog();
-       int type;
-
-       switch (theCommandID) {
-       case 4034:
-         type = QUAD_EDGE; break;
-       case 4035:
-         type = QUAD_TRIANGLE; break;
-       case 4036:
-         type = QUAD_QUADRANGLE; break;
-       case 4037:
-         type = QUAD_TETRAHEDRON; break;
-       case 4038:
-         type = QUAD_PYRAMID; break;
-       case 4039:
-         type = QUAD_PENTAHEDRON; break;
-       case 4040:
-         type = QUAD_HEXAHEDRON;
-         break;
-       default:;
-       }
-        ( new SMESHGUI_AddQuadraticElementDlg( this, type ) )->show();
+        EmitSignalDeactivateDialog();
+        int type;
+
+        switch (theCommandID) {
+        case 4034:
+          type = QUAD_EDGE; break;
+        case 4035:
+          type = QUAD_TRIANGLE; break;
+        case 4036:
+          type = QUAD_QUADRANGLE; break;
+        case 4037:
+          type = QUAD_TETRAHEDRON; break;
+        case 4038:
+          type = QUAD_PYRAMID; break;
+        case 4039:
+          type = QUAD_PENTAHEDRON; break;
+        case 4040:
+          type = QUAD_HEXAHEDRON;
+          break;
+        default:;
+        }
+         ( new SMESHGUI_AddQuadraticElementDlg( this, type ) )->show();
       }
       else {
-       SUIT_MessageBox::warning(SMESHGUI::desktop(),
-                                tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
+        SUIT_MessageBox::warning(SMESHGUI::desktop(),
+                                 tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
       }
       break;
     }
-  case 4041:                                   // REMOVES NODES
+  case 4041:                                    // REMOVES NODES
     {
       if(checkLock(aStudy)) break;
       if ( vtkwnd ) {
-       EmitSignalDeactivateDialog();
-       ( new SMESHGUI_RemoveNodesDlg( this ) )->show();
+        EmitSignalDeactivateDialog();
+        ( new SMESHGUI_RemoveNodesDlg( this ) )->show();
       }
       else {
-       SUIT_MessageBox::warning(SMESHGUI::desktop(),
-                                tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
+        SUIT_MessageBox::warning(SMESHGUI::desktop(),
+                                 tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
       }
       break;
     }
-  case 4042:                                   // REMOVES ELEMENTS
+  case 4042:                                    // REMOVES ELEMENTS
     {
       if(checkLock(aStudy)) break;
       if( vtkwnd ) {
-       EmitSignalDeactivateDialog();
-       ( new SMESHGUI_RemoveElementsDlg( this ) )->show();
+        EmitSignalDeactivateDialog();
+        ( new SMESHGUI_RemoveElementsDlg( this ) )->show();
       }
       else
-       {
-         SUIT_MessageBox::warning(SMESHGUI::desktop(),
-                                  tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
-       }
+        {
+          SUIT_MessageBox::warning(SMESHGUI::desktop(),
+                                   tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
+        }
       break;
     }
   case 4043: {                                // CLEAR_MESH
@@ -2341,53 +2341,53 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
         }
       }
       catch (const SALOME::SALOME_Exception& S_ex){
-       wc.suspend();
-       SalomeApp_Tools::QtCatchCorbaException(S_ex);
-       wc.resume();
+        wc.suspend();
+        SalomeApp_Tools::QtCatchCorbaException(S_ex);
+        wc.resume();
       }
     }
     SMESH::UpdateView();
     updateObjBrowser();
     break;
   }
-  case 4051:                                   // RENUMBERING NODES
+  case 4051:                                    // RENUMBERING NODES
     {
       if(checkLock(aStudy)) break;
       if( vtkwnd ) {
-       EmitSignalDeactivateDialog();
-       ( new SMESHGUI_RenumberingDlg( this, 0 ) )->show();
+        EmitSignalDeactivateDialog();
+        ( new SMESHGUI_RenumberingDlg( this, 0 ) )->show();
       }
       else
-       {
-         SUIT_MessageBox::warning(SMESHGUI::desktop(),
-                                  tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
-       }
+        {
+          SUIT_MessageBox::warning(SMESHGUI::desktop(),
+                                   tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
+        }
       break;
     }
-  case 4052:                                   // RENUMBERING ELEMENTS
+  case 4052:                                    // RENUMBERING ELEMENTS
     {
       if(checkLock(aStudy)) break;
       if ( vtkwnd ) {
-       EmitSignalDeactivateDialog();
-       ( new SMESHGUI_RenumberingDlg( this, 1 ) )->show();
+        EmitSignalDeactivateDialog();
+        ( new SMESHGUI_RenumberingDlg( this, 1 ) )->show();
       }
       else
-       {
-         SUIT_MessageBox::warning(SMESHGUI::desktop(),
-                                  tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
-       }
+        {
+          SUIT_MessageBox::warning(SMESHGUI::desktop(),
+                                   tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
+        }
       break;
     }
   case 4061:                                   // TRANSLATION
     {
       if(checkLock(aStudy)) break;
       if ( vtkwnd ) {
-       EmitSignalDeactivateDialog();
-       ( new SMESHGUI_TranslationDlg( this ) )->show();
+        EmitSignalDeactivateDialog();
+        ( new SMESHGUI_TranslationDlg( this ) )->show();
       }
       else {
-       SUIT_MessageBox::warning(SMESHGUI::desktop(),
-                                tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
+        SUIT_MessageBox::warning(SMESHGUI::desktop(),
+                                 tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
       }
       break;
     }
@@ -2395,12 +2395,12 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
     {
       if(checkLock(aStudy)) break;
       if( vtkwnd ) {
-       EmitSignalDeactivateDialog();
-       ( new SMESHGUI_RotationDlg( this ) )->show();
+        EmitSignalDeactivateDialog();
+        ( new SMESHGUI_RotationDlg( this ) )->show();
       }
       else {
-       SUIT_MessageBox::warning(SMESHGUI::desktop(),
-                                tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
+        SUIT_MessageBox::warning(SMESHGUI::desktop(),
+                                 tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
       }
       break;
     }
@@ -2408,12 +2408,12 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
     {
       if(checkLock(aStudy)) break;
       if(vtkwnd) {
-       EmitSignalDeactivateDialog();
-       ( new SMESHGUI_SymmetryDlg( this ) )->show();
+        EmitSignalDeactivateDialog();
+        ( new SMESHGUI_SymmetryDlg( this ) )->show();
       }
       else {
-       SUIT_MessageBox::warning(SMESHGUI::desktop(),
-                                tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
+        SUIT_MessageBox::warning(SMESHGUI::desktop(),
+                                 tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
       }
       break;
     }
@@ -2421,12 +2421,12 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
     {
       if(checkLock(aStudy)) break;
       if(vtkwnd) {
-       EmitSignalDeactivateDialog();
-       ( new SMESHGUI_SewingDlg( this ) )->show();
+        EmitSignalDeactivateDialog();
+        ( new SMESHGUI_SewingDlg( this ) )->show();
       }
       else {
-       SUIT_MessageBox::warning(SMESHGUI::desktop(),
-                                tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
+        SUIT_MessageBox::warning(SMESHGUI::desktop(),
+                                 tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
       }
       break;
     }
@@ -2434,12 +2434,12 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
     {
       if(checkLock(aStudy)) break;
       if(vtkwnd) {
-       EmitSignalDeactivateDialog();
-       ( new SMESHGUI_EditMeshDlg( this, 0 ) )->show();
+        EmitSignalDeactivateDialog();
+        ( new SMESHGUI_EditMeshDlg( this, 0 ) )->show();
       }
       else {
-       SUIT_MessageBox::warning(SMESHGUI::desktop(),
-                                tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
+        SUIT_MessageBox::warning(SMESHGUI::desktop(),
+                                 tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
       }
       break;
     }
@@ -2447,11 +2447,11 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
     {
       if (checkLock(aStudy)) break;
       if (vtkwnd) {
-       EmitSignalDeactivateDialog();
-       ( new SMESHGUI_EditMeshDlg( this, 1 ) )->show();
+        EmitSignalDeactivateDialog();
+        ( new SMESHGUI_EditMeshDlg( this, 1 ) )->show();
       } else {
-       SUIT_MessageBox::warning(SMESHGUI::desktop(),
-                                tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
+        SUIT_MessageBox::warning(SMESHGUI::desktop(),
+                                 tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"));
       }
       break;
     }
@@ -2478,7 +2478,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
   }
   break;
 
-  case 6017:                                   // CONTROLS
+  case 6017:                                    // CONTROLS
   case 6016:
   case 6015:
   case 6014:
@@ -2500,27 +2500,27 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
       SALOME_ListIO selected; mgr->selectedObjects( selected );
 
       if ( selected.Extent() == 1 && selected.First()->hasEntry() ) {
-       _PTR(SObject) SO = aStudy->FindObjectID( selected.First()->getEntry() );
-       if ( SO ) {
-         CORBA::Object_var aObject = SMESH::SObjectToObject( SO );
-         SMESH::SMESH_Mesh_var      aMesh    = SMESH::SMESH_Mesh::_narrow( aObject );
-         SMESH::SMESH_subMesh_var   aSubMesh = SMESH::SMESH_subMesh::_narrow( aObject );
-         SMESH::SMESH_GroupBase_var aGroup   = SMESH::SMESH_GroupBase::_narrow( aObject );
-         if ( !aMesh->_is_nil() || !aSubMesh->_is_nil() || !aGroup->_is_nil() ) {
-           ::Control( theCommandID );
-           break;
-         }
-       }
+        _PTR(SObject) SO = aStudy->FindObjectID( selected.First()->getEntry() );
+        if ( SO ) {
+          CORBA::Object_var aObject = SMESH::SObjectToObject( SO );
+          SMESH::SMESH_Mesh_var      aMesh    = SMESH::SMESH_Mesh::_narrow( aObject );
+          SMESH::SMESH_subMesh_var   aSubMesh = SMESH::SMESH_subMesh::_narrow( aObject );
+          SMESH::SMESH_GroupBase_var aGroup   = SMESH::SMESH_GroupBase::_narrow( aObject );
+          if ( !aMesh->_is_nil() || !aSubMesh->_is_nil() || !aGroup->_is_nil() ) {
+            ::Control( theCommandID );
+            break;
+          }
+        }
       }
       SUIT_MessageBox::warning(desktop(),
-                              tr( "SMESH_WRN_WARNING" ),
-                              tr( "SMESH_BAD_SELECTION" ) );
+                               tr( "SMESH_WRN_WARNING" ),
+                               tr( "SMESH_BAD_SELECTION" ) );
       break;
     }
     else {
       SUIT_MessageBox::warning(desktop(),
-                              tr( "SMESH_WRN_WARNING" ),
-                              tr( "NOT_A_VTK_VIEWER" ) );
+                               tr( "SMESH_WRN_WARNING" ),
+                               tr( "NOT_A_VTK_VIEWER" ) );
     }
     break;
   case 9010:
@@ -2531,11 +2531,11 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
       SALOME_ListIteratorOfListIO it(selected);
       for( ; it.More(); it.Next()) {
         Handle(SALOME_InteractiveObject) anIObject = it.Value();
-       if(anIObject->hasEntry()) {
-         if(SMESH_Actor *anActor = SMESH::FindActorByEntry(anIObject->getEntry())){
-           anActor->SetPointsLabeled( !anActor->GetPointsLabeled() );
-         }
-       }
+        if(anIObject->hasEntry()) {
+          if(SMESH_Actor *anActor = SMESH::FindActorByEntry(anIObject->getEntry())){
+            anActor->SetPointsLabeled( !anActor->GetPointsLabeled() );
+          }
+        }
       }
       break;
     }
@@ -2544,12 +2544,12 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
       LightApp_SelectionMgr* mgr = selectionMgr();
       SALOME_ListIO selected; mgr->selectedObjects( selected );
 
-      if (selected.Extent() == 1)      {
-       Handle(SALOME_InteractiveObject) anIObject = selected.First();
-       if(anIObject->hasEntry())
-         if(SMESH_Actor *anActor = SMESH::FindActorByEntry(anIObject->getEntry())){
-           anActor->SetCellsLabeled( !anActor->GetCellsLabeled() );
-         }
+      if (selected.Extent() == 1)       {
+        Handle(SALOME_InteractiveObject) anIObject = selected.First();
+        if(anIObject->hasEntry())
+          if(SMESH_Actor *anActor = SMESH::FindActorByEntry(anIObject->getEntry())){
+            anActor->SetCellsLabeled( !anActor->GetCellsLabeled() );
+          }
       }
       break;
     }
@@ -2636,7 +2636,7 @@ void SMESHGUI::createPopupItem( const int id,
                                 const QString& clients,
                                 const QString& types,
                                 const QString& theRule,
-                               const int pId )
+                                const int pId )
 {
   int parentId = pId;
   if( pId!=-1 )
@@ -3040,22 +3040,22 @@ void SMESHGUI::initialize( CAM_Application* app )
 
   myRules.clear();
   QString OB = "'ObjectBrowser'",
-         View = "'" + SVTK_Viewer::Type() + "'",
-         pat = "'%1'",
-         mesh    = pat.arg( SMESHGUI_Selection::typeName( MESH ) ),
-         group   = pat.arg( SMESHGUI_Selection::typeName( GROUP ) ),
-         hypo    = pat.arg( SMESHGUI_Selection::typeName( HYPOTHESIS ) ),
-         algo    = pat.arg( SMESHGUI_Selection::typeName( ALGORITHM ) ),
-         elems   = QString( "'%1' '%2' '%3' '%4' '%5' '%6'" ).
+          View = "'" + SVTK_Viewer::Type() + "'",
+          pat = "'%1'",
+          mesh    = pat.arg( SMESHGUI_Selection::typeName( MESH ) ),
+          group   = pat.arg( SMESHGUI_Selection::typeName( GROUP ) ),
+          hypo    = pat.arg( SMESHGUI_Selection::typeName( HYPOTHESIS ) ),
+          algo    = pat.arg( SMESHGUI_Selection::typeName( ALGORITHM ) ),
+          elems   = QString( "'%1' '%2' '%3' '%4' '%5' '%6'" ).
                        arg( SMESHGUI_Selection::typeName( SUBMESH_VERTEX ) ).
-                      arg( SMESHGUI_Selection::typeName( SUBMESH_EDGE ) ).
-                      arg( SMESHGUI_Selection::typeName( SUBMESH_FACE ) ).
-                      arg( SMESHGUI_Selection::typeName( SUBMESH_SOLID ) ).
-                      arg( SMESHGUI_Selection::typeName( SUBMESH_COMPOUND ) ).
-                      arg( SMESHGUI_Selection::typeName( SUBMESH ) ),
+                       arg( SMESHGUI_Selection::typeName( SUBMESH_EDGE ) ).
+                       arg( SMESHGUI_Selection::typeName( SUBMESH_FACE ) ).
+                       arg( SMESHGUI_Selection::typeName( SUBMESH_SOLID ) ).
+                       arg( SMESHGUI_Selection::typeName( SUBMESH_COMPOUND ) ).
+                       arg( SMESHGUI_Selection::typeName( SUBMESH ) ),
           subMesh = elems,
-         mesh_group = mesh + " " + subMesh + " " + group,
-         hyp_alg = hypo + " " + algo;
+          mesh_group = mesh + " " + subMesh + " " + group,
+          hyp_alg = hypo + " " + algo;
 
   // popup for object browser
   QString
@@ -3353,7 +3353,7 @@ void SMESHGUI::initialize( CAM_Application* app )
   popupMgr()->insert( separator(), -1, -1 );
 
   connect( application(), SIGNAL( viewManagerActivated( SUIT_ViewManager* ) ),
-          this, SLOT( onViewManagerActivated( SUIT_ViewManager* ) ) );
+           this, SLOT( onViewManagerActivated( SUIT_ViewManager* ) ) );
 }
 
 //================================================================================
@@ -3475,7 +3475,7 @@ void SMESHGUI::contextMenuPopup( const QString& client, QMenu* menu, QString& ti
     if ( obj ) {
       QString aName = QString( obj->GetName().c_str() );
       while ( aName.at( aName.length() - 1 ) == ' ' ) // Remove extraspaces in Name of Popup
-         aName.remove( (aName.length() - 1), 1 );
+          aName.remove( (aName.length() - 1), 1 );
       title = aName;
     }
   }
@@ -3752,48 +3752,48 @@ void SMESHGUI::preferencesChanged( const QString& sect, const QString& name )
     if( name=="selection_object_color" || name=="selection_element_color" ||
         name=="selection_width" || name=="highlight_color" || name=="highlight_width" ||
         name=="selection_precision_node" || name=="selection_precision_element" ||
-       name=="selection_precision_object")
+        name=="selection_precision_object")
       SMESH::UpdateSelectionProp( this );
     else if (name == QString("scalar_bar_vertical_x") || name == QString("scalar_bar_vertical_width")){
       sbX1 = aResourceMgr->doubleValue("SMESH", "scalar_bar_vertical_x", sbX1);
       sbW = aResourceMgr->doubleValue("SMESH", "scalar_bar_vertical_width", sbW);
       if(sbX1+sbW > aTol){
-       aWarning = "Origin and Size Vertical: X+Width > 1\n";
-       sbX1=0.01;
-       sbW=0.08;
-       aResourceMgr->setValue("SMESH", "scalar_bar_vertical_x", sbX1);
-       aResourceMgr->setValue("SMESH", "scalar_bar_vertical_width", sbW);
+        aWarning = "Origin and Size Vertical: X+Width > 1\n";
+        sbX1=0.01;
+        sbW=0.08;
+        aResourceMgr->setValue("SMESH", "scalar_bar_vertical_x", sbX1);
+        aResourceMgr->setValue("SMESH", "scalar_bar_vertical_width", sbW);
       }
     }
     else if(name == QString("scalar_bar_vertical_y") || name == QString("scalar_bar_vertical_height")){
       sbY1 = aResourceMgr->doubleValue("SMESH", "scalar_bar_vertical_y", sbY1);
       sbH = aResourceMgr->doubleValue("SMESH", "scalar_bar_vertical_height",sbH);
       if(sbY1+sbH > aTol){
-       aWarning = "Origin and Size Vertical: Y+Height > 1\n";
-       aResourceMgr->setValue("SMESH", "scalar_bar_vertical_y", sbY1);
-       aResourceMgr->setValue("SMESH", "scalar_bar_vertical_height",sbH);
+        aWarning = "Origin and Size Vertical: Y+Height > 1\n";
+        aResourceMgr->setValue("SMESH", "scalar_bar_vertical_y", sbY1);
+        aResourceMgr->setValue("SMESH", "scalar_bar_vertical_height",sbH);
       }
     }
     else if(name ==  QString("scalar_bar_horizontal_x") || name ==  QString("scalar_bar_horizontal_width")){
       sbX1 = aResourceMgr->doubleValue("SMESH", "scalar_bar_horizontal_x", sbX1);
       sbW = aResourceMgr->doubleValue("SMESH", "scalar_bar_horizontal_width", sbW);
       if(sbX1+sbW > aTol){
-       aWarning = "Origin and Size Horizontal: X+Width > 1\n";
-       sbX1=0.1;
-       sbW=0.08;
-       aResourceMgr->setValue("SMESH", "scalar_bar_horizontal_x", sbX1);
-       aResourceMgr->setValue("SMESH", "scalar_bar_horizontal_width", sbW);
+        aWarning = "Origin and Size Horizontal: X+Width > 1\n";
+        sbX1=0.1;
+        sbW=0.08;
+        aResourceMgr->setValue("SMESH", "scalar_bar_horizontal_x", sbX1);
+        aResourceMgr->setValue("SMESH", "scalar_bar_horizontal_width", sbW);
       }
     }
     else if(name ==  QString("scalar_bar_horizontal_y") || name ==  QString("scalar_bar_horizontal_height")){
       sbY1 = aResourceMgr->doubleValue("SMESH", "scalar_bar_horizontal_y", sbY1);
       sbH = aResourceMgr->doubleValue("SMESH", "scalar_bar_horizontal_height",sbH);
       if(sbY1+sbH > aTol){
-       aWarning = "Origin and Size Horizontal: Y+Height > 1\n";
-       sbY1=0.01;
-       sbH=0.08;
-       aResourceMgr->setValue("SMESH", "scalar_bar_horizontal_y", sbY1);
-       aResourceMgr->setValue("SMESH", "scalar_bar_horizontal_height",sbH);
+        aWarning = "Origin and Size Horizontal: Y+Height > 1\n";
+        sbY1=0.01;
+        sbH=0.08;
+        aResourceMgr->setValue("SMESH", "scalar_bar_horizontal_y", sbY1);
+        aResourceMgr->setValue("SMESH", "scalar_bar_horizontal_height",sbH);
       }
     }
     else if ( name == "segmentation" ) {
@@ -3808,8 +3808,8 @@ void SMESHGUI::preferencesChanged( const QString& sect, const QString& name )
     if(aWarning.size() != 0){
       aWarning += "The default values are applied instead.";
       SUIT_MessageBox::warning(SMESHGUI::desktop(),
-                              QObject::tr("SMESH_ERR_SCALARBAR_PARAMS"),
-                              QObject::tr(aWarning.c_str()));
+                               QObject::tr("SMESH_ERR_SCALARBAR_PARAMS"),
+                               QObject::tr(aWarning.c_str()));
     }
   }
 }
@@ -3951,7 +3951,7 @@ SALOMEDS::Color SMESHGUI::getUniqueColor( const QList<SALOMEDS::Color>& theReser
     {
       aTolerance /= 2;
       if( aTolerance < 1 )
-       break;
+        break;
     }
     //cout << "Iteration N" << anIterations << " (tolerance=" << aTolerance << ")"<< endl;
 
@@ -3972,9 +3972,9 @@ SALOMEDS::Color SMESHGUI::getUniqueColor( const QList<SALOMEDS::Color>& theReser
       //cout << h << " ";
       if( abs( h - aHue ) < aTolerance )
       {
-       ok = false;
-       //cout << "break (diff = " << abs( h - aHue ) << ")";
-       break;
+        ok = false;
+        //cout << "break (diff = " << abs( h - aHue ) << ")";
+        break;
       }
     }
     //cout << endl;
@@ -4040,19 +4040,19 @@ void SMESHGUI::storeVisualParameters (int savePoint)
       QVector<SUIT_ViewWindow*> views = vman->getViews();
       for (int i = 0, iEnd = vman->getViewsCount(); i < iEnd; i++)
       {
-       if (SVTK_ViewWindow* vtkView = dynamic_cast<SVTK_ViewWindow*>(views[i]))
+        if (SVTK_ViewWindow* vtkView = dynamic_cast<SVTK_ViewWindow*>(views[i]))
         {
-         VTK::ActorCollectionCopy aCopy(vtkView->getRenderer()->GetActors());
-         vtkActorCollection* allActors = aCopy.GetActors();
-         allActors->InitTraversal();
-         while (vtkActor* actor = allActors->GetNextActor())
+          VTK::ActorCollectionCopy aCopy(vtkView->getRenderer()->GetActors());
+          vtkActorCollection* allActors = aCopy.GetActors();
+          allActors->InitTraversal();
+          while (vtkActor* actor = allActors->GetNextActor())
           {
-           if (actor->GetVisibility()) // store only visible actors
+            if (actor->GetVisibility()) // store only visible actors
             {
               SMESH_Actor* aSmeshActor = 0;
               if (actor->IsA("SMESH_Actor"))
                 aSmeshActor = SMESH_Actor::SafeDownCast(actor);
-             if (aSmeshActor && aSmeshActor->hasIO())
+              if (aSmeshActor && aSmeshActor->hasIO())
               {
                 Handle(SALOME_InteractiveObject) io = aSmeshActor->getIO();
                 if (io->hasEntry())
@@ -4161,10 +4161,10 @@ void SMESHGUI::storeVisualParameters (int savePoint)
                     ip->setParameter(entry, param + QString::number(ipl+1).toLatin1().data(), planeValue);
                   }
                 } // if (io->hasEntry())
-             } // SMESH_Actor && hasIO
-           } // isVisible
-         } // while.. actors traversal
-       } // if (vtkView)
+              } // SMESH_Actor && hasIO
+            } // isVisible
+          } // while.. actors traversal
+        } // if (vtkView)
       } // for (views)
       vtkViewers++;
     } // if (SVTK view model)
@@ -4232,7 +4232,7 @@ void SMESHGUI::restoreVisualParameters (int savePoint)
       bool ok;
       int viewIndex = viewIndexStr.toUInt(&ok);
       if (!ok) // bad conversion of view index to integer
-       continue;
+        continue;
 
       // viewers
       if (viewerTypStr == SVTK_Viewer::Type())
@@ -4259,7 +4259,7 @@ void SMESHGUI::restoreVisualParameters (int savePoint)
               // access later when restoring other parameters
               SVTK_ViewWindow* vtkView = (SVTK_ViewWindow*) vman->getActiveView();
               vtkRenderer* Renderer = vtkView->getRenderer();
-             VTK::ActorCollectionCopy aCopy(Renderer->GetActors());
+              VTK::ActorCollectionCopy aCopy(Renderer->GetActors());
               vtkActorCollection* theActors = aCopy.GetActors();
               theActors->InitTraversal();
               bool isFound = false;
@@ -4280,10 +4280,10 @@ void SMESHGUI::restoreVisualParameters (int savePoint)
             }
           }
         } // if (paramNameStr == "Visibility")
-       else
+        else
         {
           // the rest properties "work" with SMESH_Actor
-         if (aSmeshActor)
+          if (aSmeshActor)
           {
             QString val ((*valuesIt).c_str());
 
@@ -4386,7 +4386,7 @@ void SMESHGUI::restoreVisualParameters (int savePoint)
               }
             }
           } // if (aSmeshActor)
-       } // other parameters than Visibility
+        } // other parameters than Visibility
       }
     } // for names/parameters iterator
   } // for entries iterator
index fd617e809019894c351bbf567ae0915e6ecb6847..33c410193b8e2af5db679aaa152ec13da2bed0ca 100644 (file)
@@ -186,11 +186,11 @@ namespace SMESH
       vtkIdList *anIds = vtkIdList::New();
 
       if(aConn)
-       for (int i = 0, iEnd = theIds.size(); i < iEnd; i++)
-         anIds->InsertId(i,theIds[aConn[i]]);
+        for (int i = 0, iEnd = theIds.size(); i < iEnd; i++)
+          anIds->InsertId(i,theIds[aConn[i]]);
       else
-       for (int i = 0, iEnd = theIds.size(); i < iEnd; i++)
-         anIds->InsertId(i,theIds[i]);
+        for (int i = 0, iEnd = theIds.size(); i < iEnd; i++)
+          anIds->InsertId(i,theIds[i]);
 
       myGrid->InsertNextCell(theType,anIds);
       anIds->Delete();
@@ -212,8 +212,8 @@ namespace SMESH
     ~TElementSimulation()
     {
       if (FindVtkViewWindow(myApplication->activeViewManager(), myViewWindow)) {
-       myVTKViewWindow->RemoveActor(myPreviewActor);
-       myVTKViewWindow->RemoveActor(myFaceOrientation);
+        myVTKViewWindow->RemoveActor(myPreviewActor);
+        myVTKViewWindow->RemoveActor(myFaceOrientation);
       }
       myPreviewActor->Delete();
       myFaceOrientation->Delete();
@@ -237,7 +237,7 @@ namespace SMESH
 //=================================================================================
 SMESHGUI_AddMeshElementDlg::SMESHGUI_AddMeshElementDlg( SMESHGUI* theModule,
                                                         SMDSAbs_ElementType ElementType,
-                                                       int nbNodes )
+                                                        int nbNodes )
   : QDialog( SMESH::GetDesktop( theModule ) ),
     mySMESHGUI( theModule ),
     mySelectionMgr( SMESH::GetSelectionMgr( theModule ) )
@@ -466,9 +466,9 @@ void SMESHGUI_AddMeshElementDlg::ClickOnApply()
       aMeshEditor->AddEdge(anArrayOfIndices.inout()); break;
     case SMDSAbs_Face: {
       if(myIsPoly)
-       aMeshEditor->AddPolygonalFace(anArrayOfIndices.inout());
+        aMeshEditor->AddPolygonalFace(anArrayOfIndices.inout());
       else
-       aMeshEditor->AddFace(anArrayOfIndices.inout());
+        aMeshEditor->AddFace(anArrayOfIndices.inout());
       break;
     }
     case SMDSAbs_Volume:
@@ -536,10 +536,10 @@ void SMESHGUI_AddMeshElementDlg::ClickOnHelp()
     platform = "application";
 #endif
     SUIT_MessageBox::warning(this, tr("WRN_WARNING"),
-                            tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
-                            arg(app->resourceMgr()->stringValue("ExternalBrowser",
-                                                                platform)).
-                            arg(myHelpFileName));
+                             tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                             arg(app->resourceMgr()->stringValue("ExternalBrowser",
+                                                                 platform)).
+                             arg(myHelpFileName));
   }
 }
 
@@ -571,12 +571,12 @@ void SMESHGUI_AddMeshElementDlg::onTextChange (const QString& theNewText)
     bool allOk = true;
     for (int i = 0; i < aListId.count(); i++) {
       if( const SMDS_MeshNode * n = aMesh->FindNode( aListId[ i ].toInt() ) )
-       {
-         newIndices.Add( n->GetID() );
-         myNbOkNodes++;
-       }
+        {
+          newIndices.Add( n->GetID() );
+          myNbOkNodes++;
+        }
       else
-       allOk = false;  
+        allOk = false;  
     }
 
     mySelector->AddOrRemoveIndex( myActor->getIO(), newIndices, false );
@@ -587,10 +587,10 @@ void SMESHGUI_AddMeshElementDlg::onTextChange (const QString& theNewText)
 
     if (myIsPoly)
       {
-       if ( !allOk || myElementType != SMDSAbs_Face || aListId.count() < 3 )
-         myNbOkNodes = 0;
-       else
-         myNbOkNodes = aListId.count();
+        if ( !allOk || myElementType != SMDSAbs_Face || aListId.count() < 3 )
+          myNbOkNodes = 0;
+        else
+          myNbOkNodes = aListId.count();
       }
   }
 
index 1c3106e735eb3c1ed149aceebfa603bd56d8d136..4a9fa18acb5efd73a78a38d9d403b79a94a6d581 100644 (file)
@@ -221,7 +221,7 @@ namespace SMESH
     void SetPosition (SMESH_Actor* theActor,
                       const int    theType,
                       TVTKIds&     theIds,
-                     const int    theMode,
+                      const int    theMode,
                       const bool   theReverse)
     {
       vtkUnstructuredGrid *aGrid = theActor->GetUnstructuredGrid();
@@ -311,8 +311,8 @@ namespace SMESH
     ~TElementSimulation()
     {
       if (FindVtkViewWindow(myApplication->activeViewManager(), myViewWindow)) {
-       myVTKViewWindow->RemoveActor(myPreviewActor);
-       myVTKViewWindow->RemoveActor(myFaceOrientation);
+        myVTKViewWindow->RemoveActor(myPreviewActor);
+        myVTKViewWindow->RemoveActor(myFaceOrientation);
       }
       myPreviewActor->Delete();
       myFaceOrientation->Delete();
@@ -411,7 +411,7 @@ QWidget* IdEditItem::createEditor() const
 // purpose  : constructor
 //=================================================================================
 SMESHGUI_AddQuadraticElementDlg::SMESHGUI_AddQuadraticElementDlg( SMESHGUI* theModule,
-                                                                 const int theType )
+                                                                  const int theType )
   : QDialog( SMESH::GetDesktop( theModule ) ),
     mySMESHGUI( theModule ),
     mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
@@ -766,10 +766,10 @@ void SMESHGUI_AddQuadraticElementDlg::ClickOnHelp()
     platform = "application";
 #endif
     SUIT_MessageBox::warning(this, tr("WRN_WARNING"),
-                            tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
-                            arg(app->resourceMgr()->stringValue("ExternalBrowser", 
-                                                                platform)).
-                            arg(myHelpFileName));
+                             tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                             arg(app->resourceMgr()->stringValue("ExternalBrowser", 
+                                                                 platform)).
+                             arg(myHelpFileName));
   }
 }
 
@@ -797,12 +797,12 @@ void SMESHGUI_AddQuadraticElementDlg::onTextChange (const QString& theNewText)
     for (int i = 0; i < aListId.count(); i++) {
       if ( const SMDS_MeshNode * n = aMesh->FindNode( aListId[ i ].toInt() ) )
       {
-       newIndices.Add( n->GetID() );
+        newIndices.Add( n->GetID() );
       }
       else
       {
-       allOk = false;
-       break;
+        allOk = false;
+        break;
       }
     }
     
@@ -914,16 +914,16 @@ void SMESHGUI_AddQuadraticElementDlg::displaySimulation()
     else
     {
       for ( int row = 0; row < myNbCorners; row++ )
-       anIds.push_back( myActor->GetObject()->GetNodeVTKId( myTable->item(row, 0)->text().toInt() ) );
+        anIds.push_back( myActor->GetObject()->GetNodeVTKId( myTable->item(row, 0)->text().toInt() ) );
       
       for ( int row = 0; row < myTable->rowCount(); row++ )
       {
-       anID = myTable->item(row, 1)->text().toInt(&ok);
-       if (!ok) {
-         anID = myTable->item(row, 0)->text().toInt();
-         aDisplayMode = VTK_WIREFRAME;
-       }
-       anIds.push_back( myActor->GetObject()->GetNodeVTKId(anID) );
+        anID = myTable->item(row, 1)->text().toInt(&ok);
+        if (!ok) {
+          anID = myTable->item(row, 0)->text().toInt();
+          aDisplayMode = VTK_WIREFRAME;
+        }
+        anIds.push_back( myActor->GetObject()->GetNodeVTKId(anID) );
       }
     }
     
@@ -1117,7 +1117,7 @@ void SMESHGUI_AddQuadraticElementDlg::UpdateTable( bool theConersValidity )
     // clear table
     for ( int row = 0; row < myTable->rowCount(); row++ )
       for ( int col = 0; col < myTable->columnCount(); col++ )
-       if ( QTableWidgetItem* aTWI = myTable->item(row, col) ) aTWI->setText("");
+        if ( QTableWidgetItem* aTWI = myTable->item(row, col) ) aTWI->setText("");
     
     myTable->setEnabled( false );
   }
index 3ec453d0b21ffcd44e71f58bfd9f1eba7b00f6a7..c26ecf3c5a2d71979b426d28c05ae4e7c61f795c 100644 (file)
@@ -292,22 +292,22 @@ bool SMESHGUI_BuildCompoundDlg::ClickOnApply()
   if (!myMesh->_is_nil()) {
     QStringList aParameters;
     aParameters << (CheckBoxMerge->isChecked() ? SpinBoxTol->text() : QString(" "));
-    try        {
+    try {
       SUIT_OverrideCursor aWaitCursor;
 
       SMESH::SMESH_Gen_var aSMESHGen = SMESHGUI::GetSMESHGen();
       // concatenate meshes
       SMESH::SMESH_Mesh_var aCompoundMesh;
       if(CheckBoxCommon->isChecked())
-       aCompoundMesh = aSMESHGen->ConcatenateWithGroups(myMeshArray, 
-                                                        !(ComboBoxUnion->currentIndex()), 
-                                                        CheckBoxMerge->isChecked(), 
-                                                        SpinBoxTol->GetValue());
+        aCompoundMesh = aSMESHGen->ConcatenateWithGroups(myMeshArray, 
+                                                         !(ComboBoxUnion->currentIndex()), 
+                                                         CheckBoxMerge->isChecked(), 
+                                                         SpinBoxTol->GetValue());
       else
-       aCompoundMesh = aSMESHGen->Concatenate(myMeshArray, 
-                                              !(ComboBoxUnion->currentIndex()), 
-                                              CheckBoxMerge->isChecked(), 
-                                              SpinBoxTol->GetValue());
+        aCompoundMesh = aSMESHGen->Concatenate(myMeshArray, 
+                                               !(ComboBoxUnion->currentIndex()), 
+                                               CheckBoxMerge->isChecked(), 
+                                               SpinBoxTol->GetValue());
      
       aCompoundMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
 
@@ -360,10 +360,10 @@ void SMESHGUI_BuildCompoundDlg::ClickOnHelp()
     app->onHelpContextModule(mySMESHGUI ? app->moduleName(mySMESHGUI->moduleName()) : QString(""), myHelpFileName);
   else {
     SUIT_MessageBox::warning(this, tr("WRN_WARNING"),
-                            tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
-                            arg(app->resourceMgr()->stringValue("ExternalBrowser",
-                                                                "application")).
-                            arg(myHelpFileName));
+                             tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                             arg(app->resourceMgr()->stringValue("ExternalBrowser",
+                                                                 "application")).
+                             arg(myHelpFileName));
   }
 }
 
index 6f2d9293ecc4f9f201f17a46a447273302202bfc..1364b265d38a9436f9cea024343d8fb936f8d5dd 100644 (file)
@@ -264,31 +264,31 @@ void SMESHGUI_ClippingDlg::AddPlane (SMESH_Actor*         theActor,
   vtkFloatingPointType aDel = aDataSet->GetLength()/2.0;
 
   vtkFloatingPointType aDelta[2][3] = {{aDir[0][0]*aDel, aDir[0][1]*aDel, aDir[0][2]*aDel},
-                                      {aDir[1][0]*aDel, aDir[1][1]*aDel, aDir[1][2]*aDel}};
+                                       {aDir[1][0]*aDel, aDir[1][1]*aDel, aDir[1][2]*aDel}};
   vtkFloatingPointType aParam, aPnt0[3], aPnt1[3], aPnt2[3];
 
   vtkFloatingPointType aPnt01[3] = {aPnt[0] - aDelta[0][0] - aDelta[1][0],
-                                   aPnt[1] - aDelta[0][1] - aDelta[1][1],
-                                   aPnt[2] - aDelta[0][2] - aDelta[1][2]};
+                                    aPnt[1] - aDelta[0][1] - aDelta[1][1],
+                                    aPnt[2] - aDelta[0][2] - aDelta[1][2]};
   vtkFloatingPointType aPnt02[3] = {aPnt01[0] + aNormal[0],
-                                   aPnt01[1] + aNormal[1],
-                                   aPnt01[2] + aNormal[2]};
+                                    aPnt01[1] + aNormal[1],
+                                    aPnt01[2] + aNormal[2]};
   vtkPlane::IntersectWithLine(aPnt01,aPnt02,aNormal,anOrigin,aParam,aPnt0);
 
   vtkFloatingPointType aPnt11[3] = {aPnt[0] - aDelta[0][0] + aDelta[1][0],
-                                   aPnt[1] - aDelta[0][1] + aDelta[1][1],
-                                   aPnt[2] - aDelta[0][2] + aDelta[1][2]};
+                                    aPnt[1] - aDelta[0][1] + aDelta[1][1],
+                                    aPnt[2] - aDelta[0][2] + aDelta[1][2]};
   vtkFloatingPointType aPnt12[3] = {aPnt11[0] + aNormal[0],
-                                   aPnt11[1] + aNormal[1],
-                                   aPnt11[2] + aNormal[2]};
+                                    aPnt11[1] + aNormal[1],
+                                    aPnt11[2] + aNormal[2]};
   vtkPlane::IntersectWithLine(aPnt11,aPnt12,aNormal,anOrigin,aParam,aPnt1);
 
   vtkFloatingPointType aPnt21[3] = {aPnt[0] + aDelta[0][0] - aDelta[1][0],
-                                   aPnt[1] + aDelta[0][1] - aDelta[1][1],
-                                   aPnt[2] + aDelta[0][2] - aDelta[1][2]};
+                                    aPnt[1] + aDelta[0][1] - aDelta[1][1],
+                                    aPnt[2] + aDelta[0][2] - aDelta[1][2]};
   vtkFloatingPointType aPnt22[3] = {aPnt21[0] + aNormal[0],
-                                   aPnt21[1] + aNormal[1],
-                                   aPnt21[2] + aNormal[2]};
+                                    aPnt21[1] + aNormal[1],
+                                    aPnt21[2] + aNormal[2]};
   vtkPlane::IntersectWithLine(aPnt21,aPnt22,aNormal,anOrigin,aParam,aPnt2);
 
   vtkPlaneSource* aPlaneSource = aPlane->myPlaneSource;
@@ -555,17 +555,17 @@ void SMESHGUI_ClippingDlg::ClickOnHelp()
   if (app) 
     app->onHelpContextModule(mySMESHGUI ? app->moduleName(mySMESHGUI->moduleName()) : QString(""), myHelpFileName);
   else {
-               QString platform;
+                QString platform;
 #ifdef WIN32
-               platform = "winapplication";
+                platform = "winapplication";
 #else
-               platform = "application";
+                platform = "application";
 #endif
     SUIT_MessageBox::warning(this, tr("WRN_WARNING"),
-                            tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
-                            arg(app->resourceMgr()->stringValue("ExternalBrowser", 
-                                                                platform)).
-                            arg(myHelpFileName));
+                             tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                             arg(app->resourceMgr()->stringValue("ExternalBrowser", 
+                                                                 platform)).
+                             arg(myHelpFileName));
   }
 }
 
@@ -581,24 +581,24 @@ void SMESHGUI_ClippingDlg::onSelectionChanged()
       Handle(SALOME_InteractiveObject) IOS = aList.First();
       myActor = SMESH::FindActorByEntry(IOS->getEntry());
       if (myActor) {
-       std::for_each(myPlanes.begin(),myPlanes.end(),TSetVisiblity(false));
-       myPlanes.clear();
-
-       vtkIdType anId = 0, anEnd = myActor->GetNumberOfClippingPlanes();
-       for ( ; anId < anEnd; anId++) {
-         if (vtkImplicitFunction* aFunction = myActor->GetClippingPlane(anId)) {
-           if(OrientedPlane* aPlane = OrientedPlane::SafeDownCast(aFunction)){
-             OrientedPlane* anOrientedPlane = OrientedPlane::New(aViewWindow);
-             SMESH::TVTKPlane aTVTKPlane(anOrientedPlane);
-             anOrientedPlane->Delete();
-             aTVTKPlane->ShallowCopy(aPlane);
-             myPlanes.push_back(aTVTKPlane);
-           }
-         }
-       }
-
-       std::for_each(myPlanes.begin(),myPlanes.end(),
-                     TSetVisiblity(PreviewCheckBox->isChecked()));
+        std::for_each(myPlanes.begin(),myPlanes.end(),TSetVisiblity(false));
+        myPlanes.clear();
+
+        vtkIdType anId = 0, anEnd = myActor->GetNumberOfClippingPlanes();
+        for ( ; anId < anEnd; anId++) {
+          if (vtkImplicitFunction* aFunction = myActor->GetClippingPlane(anId)) {
+            if(OrientedPlane* aPlane = OrientedPlane::SafeDownCast(aFunction)){
+              OrientedPlane* anOrientedPlane = OrientedPlane::New(aViewWindow);
+              SMESH::TVTKPlane aTVTKPlane(anOrientedPlane);
+              anOrientedPlane->Delete();
+              aTVTKPlane->ShallowCopy(aPlane);
+              myPlanes.push_back(aTVTKPlane);
+            }
+          }
+        }
+
+        std::for_each(myPlanes.begin(),myPlanes.end(),
+                      TSetVisiblity(PreviewCheckBox->isChecked()));
       }
     }
     SMESH::RenderViewWindow(aViewWindow);
@@ -840,31 +840,31 @@ void SMESHGUI_ClippingDlg::SetCurrentPlaneParam()
   vtkFloatingPointType aDel = aDataSet->GetLength()/2.0;
 
   vtkFloatingPointType aDelta[2][3] = {{aDir[0][0]*aDel, aDir[0][1]*aDel, aDir[0][2]*aDel},
-                                      {aDir[1][0]*aDel, aDir[1][1]*aDel, aDir[1][2]*aDel}};
+                                       {aDir[1][0]*aDel, aDir[1][1]*aDel, aDir[1][2]*aDel}};
   vtkFloatingPointType aParam, aPnt0[3], aPnt1[3], aPnt2[3];
 
   vtkFloatingPointType aPnt01[3] = {aPnt[0] - aDelta[0][0] - aDelta[1][0],
-                                   aPnt[1] - aDelta[0][1] - aDelta[1][1],
-                                   aPnt[2] - aDelta[0][2] - aDelta[1][2]};
+                                    aPnt[1] - aDelta[0][1] - aDelta[1][1],
+                                    aPnt[2] - aDelta[0][2] - aDelta[1][2]};
   vtkFloatingPointType aPnt02[3] = {aPnt01[0] + aNormal[0],
-                                   aPnt01[1] + aNormal[1],
-                                   aPnt01[2] + aNormal[2]};
+                                    aPnt01[1] + aNormal[1],
+                                    aPnt01[2] + aNormal[2]};
   vtkPlane::IntersectWithLine(aPnt01,aPnt02,aNormal,anOrigin,aParam,aPnt0);
 
   vtkFloatingPointType aPnt11[3] = {aPnt[0] - aDelta[0][0] + aDelta[1][0],
-                                   aPnt[1] - aDelta[0][1] + aDelta[1][1],
-                                   aPnt[2] - aDelta[0][2] + aDelta[1][2]};
+                                    aPnt[1] - aDelta[0][1] + aDelta[1][1],
+                                    aPnt[2] - aDelta[0][2] + aDelta[1][2]};
   vtkFloatingPointType aPnt12[3] = {aPnt11[0] + aNormal[0],
-                                   aPnt11[1] + aNormal[1],
-                                   aPnt11[2] + aNormal[2]};
+                                    aPnt11[1] + aNormal[1],
+                                    aPnt11[2] + aNormal[2]};
   vtkPlane::IntersectWithLine(aPnt11,aPnt12,aNormal,anOrigin,aParam,aPnt1);
 
   vtkFloatingPointType aPnt21[3] = {aPnt[0] + aDelta[0][0] - aDelta[1][0],
-                                   aPnt[1] + aDelta[0][1] - aDelta[1][1],
-                                   aPnt[2] + aDelta[0][2] - aDelta[1][2]};
+                                    aPnt[1] + aDelta[0][1] - aDelta[1][1],
+                                    aPnt[2] + aDelta[0][2] - aDelta[1][2]};
   vtkFloatingPointType aPnt22[3] = {aPnt21[0] + aNormal[0],
-                                   aPnt21[1] + aNormal[1],
-                                   aPnt21[2] + aNormal[2]};
+                                    aPnt21[1] + aNormal[1],
+                                    aPnt21[2] + aNormal[2]};
   vtkPlane::IntersectWithLine(aPnt21,aPnt22,aNormal,anOrigin,aParam,aPnt2);
 
   vtkPlaneSource* aPlaneSource = aPlane->myPlaneSource;
index af9829762b20cf065cb3f82ef5f8a5e11171d918..ed92330f27031525500e2a878919f8441eb2c4b7 100644 (file)
@@ -82,16 +82,16 @@ public:
   // used in SMESHGUI::restoreVisualParameters() to avoid
   // declaration of OrientedPlane outside of SMESHGUI_ClippingDlg.cxx
   static void             AddPlane (SMESH_Actor*         theActor,
-                                   SVTK_ViewWindow*     theViewWindow,
-                                   SMESH::Orientation   theOrientation,
-                                   double               theDistance,
-                                   vtkFloatingPointType theAngle[2]);
+                                    SVTK_ViewWindow*     theViewWindow,
+                                    SMESH::Orientation   theOrientation,
+                                    double               theDistance,
+                                    vtkFloatingPointType theAngle[2]);
 
   static void             GetPlaneParam (SMESH_Actor*          theActor,
-                                        int                   thePlaneIndex,
-                                        SMESH::Orientation&   theOrientation,
-                                        double&               theDistance,
-                                        vtkFloatingPointType* theAngle);
+                                         int                   thePlaneIndex,
+                                         SMESH::Orientation&   theOrientation,
+                                         double&               theDistance,
+                                         vtkFloatingPointType* theAngle);
 
 protected:  
   void                    keyPressEvent( QKeyEvent* );
index 962b11abdf95ddca42b1ac344acaa8c4961664b3..656b474637ed5de7329dbe95df47aa36c5003d97 100644 (file)
@@ -185,7 +185,7 @@ bool SMESHGUI_ConvToQuadOp::onApply()
   {
     dlg()->show();
     SUIT_MessageBox::warning( myDlg,
-                             tr( "SMESH_WRN_WARNING" ), tr("MESH_IS_NOT_SELECTED") );
+                              tr( "SMESH_WRN_WARNING" ), tr("MESH_IS_NOT_SELECTED") );
    
     return false;
   }
@@ -196,7 +196,7 @@ bool SMESHGUI_ConvToQuadOp::onApply()
   if( CORBA::is_nil(mesh) )
   {
     SUIT_MessageBox::warning( myDlg,
-                             tr( "SMESH_WRN_WARNING" ), tr("REF_IS_NULL") );
+                              tr( "SMESH_WRN_WARNING" ), tr("REF_IS_NULL") );
 
     return false;
   } 
@@ -210,7 +210,7 @@ bool SMESHGUI_ConvToQuadOp::onApply()
     {
       bool aParam = true;
       if( myDlg->IsEnabledCheck() )
-       aParam = myDlg->IsMediumNdsOnGeom();
+        aParam = myDlg->IsMediumNdsOnGeom();
 
       aEditor->ConvertToQuadratic( aParam );
       aResult = true; 
index e50b7048ca01c56b79aba75afbdbb4dd81f19ed4..5ee6ade482b4bf05fef0da14ef7c594ea18f171f 100755 (executable)
@@ -193,11 +193,11 @@ QWidget* SMESHGUI_CreatePatternDlg::createMainFrame( QWidget* theParent )
   // Connect signals and slots
 
   connect( myTypeGrp,    SIGNAL( buttonClicked( int )  ),
-          this,         SLOT( onTypeChanged( int ) ) );
+           this,         SLOT( onTypeChanged( int ) ) );
   connect( myProjectChk, SIGNAL( toggled( bool ) ),
-          this,         SLOT( onProject( bool ) ) );
+           this,         SLOT( onProject( bool ) ) );
   connect( aSelBtn,      SIGNAL( clicked() ),
-          this,         SLOT( onSelBtnClicked() ) );
+           this,         SLOT( onSelBtnClicked() ) );
 
   return aMainGrp;
 }
@@ -274,11 +274,11 @@ void SMESHGUI_CreatePatternDlg::Init( const int theType )
 
   // selection and SMESHGUI
   connect( mySelectionMgr, SIGNAL( currentSelectionChanged() ),
-          this,           SLOT( onSelectionDone() ) );
+           this,           SLOT( onSelectionDone() ) );
   connect( mySMESHGUI,     SIGNAL( SignalDeactivateActiveDialog() ),
-          this,           SLOT( onDeactivate() ) );
+           this,           SLOT( onDeactivate() ) );
   connect( mySMESHGUI,     SIGNAL( SignalCloseAllDialogs() ),
-          this,           SLOT( onClose() ) );
+           this,           SLOT( onClose() ) );
 
   mySwitch2d->setEnabled( theType == Type_2d );
   mySwitch3d->setEnabled( theType == Type_3d );
@@ -342,8 +342,8 @@ bool SMESHGUI_CreatePatternDlg::isValid()
 {
   if ( myGeomObj->_is_nil() ) {
     SUIT_MessageBox::information( this,
-                                 tr( "SMESH_INSUFFICIENT_DATA" ),
-                                 tr( "SMESHGUI_INVALID_PARAMETERS" ) );
+                                  tr( "SMESH_INSUFFICIENT_DATA" ),
+                                  tr( "SMESHGUI_INVALID_PARAMETERS" ) );
     return false;
   }
   return true;
@@ -406,13 +406,13 @@ void SMESHGUI_CreatePatternDlg::onSave()
 
     if ( aWritten != aLen ) {
       SUIT_MessageBox::information( this,
-                                   tr( "SMESH_ERROR" ),
-                                   tr( "ERROR_OF_SAVING" ) );
+                                    tr( "SMESH_ERROR" ),
+                                    tr( "ERROR_OF_SAVING" ) );
     } 
     else {
       //SUIT_Application::getDesktop()->setSelectionModes(ActorSelection);
       if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ) )
-       aViewWindow->SetSelectionMode( ActorSelection );
+        aViewWindow->SetSelectionMode( ActorSelection );
       disconnect( mySelectionMgr, 0, this, 0 );
       disconnect( mySMESHGUI, 0, this, 0 );
       mySMESHGUI->ResetState();
@@ -465,7 +465,7 @@ void SMESHGUI_CreatePatternDlg::onOk()
     else {
       //SUIT_Application::getDesktop()->setSelectionModes(ActorSelection);
       if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ) )
-       aViewWindow->SetSelectionMode( ActorSelection );
+        aViewWindow->SetSelectionMode( ActorSelection );
       disconnect( mySelectionMgr, 0, this, 0 );
       disconnect( mySMESHGUI, 0, this, 0 );
       mySMESHGUI->ResetState();
@@ -512,11 +512,11 @@ void SMESHGUI_CreatePatternDlg::onHelp()
     platform = "application";
 #endif
     SUIT_MessageBox::warning( this, 
-                             tr( "WRN_WARNING" ),
-                             tr( "EXTERNAL_BROWSER_CANNOT_SHOW_PAGE" ).
-                             arg( app->resourceMgr()->stringValue( "ExternalBrowser", 
-                                                                   platform ) ).
-                             arg( myHelpFileName ) );
+                              tr( "WRN_WARNING" ),
+                              tr( "EXTERNAL_BROWSER_CANNOT_SHOW_PAGE" ).
+                              arg( app->resourceMgr()->stringValue( "ExternalBrowser", 
+                                                                    platform ) ).
+                              arg( myHelpFileName ) );
   }
 }
 
@@ -754,20 +754,20 @@ void SMESHGUI_CreatePatternDlg::activateSelection()
 
   if ( myType == Type_2d ) {
     mySelectionMgr->installFilter( new SMESH_NumberFilter( "SMESH",
-                                                          TopAbs_SHAPE,
-                                                          -1,
-                                                          TopAbs_FACE ) );
+                                                           TopAbs_SHAPE,
+                                                           -1,
+                                                           TopAbs_FACE ) );
   } 
   else {
     TColStd_MapOfInteger aTypes;
     aTypes.Add( TopAbs_SHELL );
     aTypes.Add( TopAbs_SOLID );
     mySelectionMgr->installFilter( new SMESH_NumberFilter( "SMESH",
-                                                          TopAbs_FACE,
-                                                          6,
-                                                          aTypes,
-                                                          GEOM::GEOM_Object::_nil(),
-                                                          true ) );
+                                                           TopAbs_FACE,
+                                                           6,
+                                                           aTypes,
+                                                           GEOM::GEOM_Object::_nil(),
+                                                           true ) );
   }
 }
 
index a9736fd6155595fc73581cdee274357465eee728..c62b83711ee7a945af2c8762951cc29da944f8e2 100644 (file)
@@ -129,9 +129,9 @@ namespace SMESH
 
     typedef std::vector<vtkIdType> TVTKIds;
     void SetPosition(SMESH_Actor* theActor, 
-                    vtkIdType theType, 
-                    const TVTKIds& theIds,
-                    bool theReset=true)
+                     vtkIdType theType, 
+                     const TVTKIds& theIds,
+                     bool theReset=true)
     {
       vtkUnstructuredGrid *aGrid = theActor->GetUnstructuredGrid();
       myGrid->SetPoints(aGrid->GetPoints());
@@ -141,14 +141,14 @@ namespace SMESH
       vtkIdList *anIds = vtkIdList::New();
 
       for (int i = 0, iEnd = theIds.size(); i < iEnd; i++)
-       anIds->InsertId(i,theIds[i]);
+        anIds->InsertId(i,theIds[i]);
 
       myGrid->InsertNextCell(theType,anIds);
       if(theIds.size()!=0){
-       myGrid->InsertNextCell(theType,anIds);
-       myGrid->Modified();
+        myGrid->InsertNextCell(theType,anIds);
+        myGrid->Modified();
       }
-       
+        
       anIds->Delete();
 
       SetVisibility(true);
@@ -167,7 +167,7 @@ namespace SMESH
 
     ~TPolySimulation(){
       if( myViewWindow )
-       myViewWindow->RemoveActor(myPreviewActor);
+        myViewWindow->RemoveActor(myPreviewActor);
 
       myPreviewActor->Delete();
 
@@ -358,42 +358,42 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::ConstructorsClicked(int constructorId)
     {
     case 0 :
       { 
-       if ( myActor ){
+        if ( myActor ){
           myActor->SetPointRepresentation(true);
-       }
+        }
         else
           SMESH::SetPointRepresentation(true);
-       if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
-         aViewWindow->SetSelectionMode(NodeSelection);
-       
-       AddButton->setEnabled(false);
-       RemoveButton->setEnabled(false);
-       TextLabelIds->setText( tr( "SMESH_ID_NODES" ) );
-       myFacesByNodesLabel->show();
-       myFacesByNodes->clear();
-       myFacesByNodes->show();
-       AddButton->show();
-       RemoveButton->show();
-       Preview->show();
-       break;
+        if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+          aViewWindow->SetSelectionMode(NodeSelection);
+        
+        AddButton->setEnabled(false);
+        RemoveButton->setEnabled(false);
+        TextLabelIds->setText( tr( "SMESH_ID_NODES" ) );
+        myFacesByNodesLabel->show();
+        myFacesByNodes->clear();
+        myFacesByNodes->show();
+        AddButton->show();
+        RemoveButton->show();
+        Preview->show();
+        break;
       }
     case 1 :
       {
-       if( myActor ){
-         myActor->SetPointRepresentation(false);
-       } else {
-         SMESH::SetPointRepresentation(false);
-       }
-       if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
-         aViewWindow->SetSelectionMode(FaceSelection);
-       
-       TextLabelIds->setText( tr( "SMESH_ID_FACES" ) );
-       myFacesByNodesLabel->hide();
-       myFacesByNodes->hide();
-       AddButton->hide();
-       RemoveButton->hide();
-       Preview->show();
-       break;
+        if( myActor ){
+          myActor->SetPointRepresentation(false);
+        } else {
+          SMESH::SetPointRepresentation(false);
+        }
+        if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+          aViewWindow->SetSelectionMode(FaceSelection);
+        
+        TextLabelIds->setText( tr( "SMESH_ID_FACES" ) );
+        myFacesByNodesLabel->hide();
+        myFacesByNodes->hide();
+        AddButton->hide();
+        RemoveButton->hide();
+        Preview->show();
+        break;
       }
     }
   
@@ -425,71 +425,71 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::ClickOnApply()
       if(checkEditLine(false) == -1) {return;}
       busy = true;
       if (GetConstructorId() == 0)
-       {
-         SMESH::long_array_var anIdsOfNodes = new SMESH::long_array;
-         SMESH::long_array_var aQuantities  = new SMESH::long_array;
-
-         aQuantities->length( myFacesByNodes->count() );
-
-         TColStd_ListOfInteger aNodesIds;
-
-         int aNbQuantities = 0;
-         for (int i = 0; i < myFacesByNodes->count(); i++ ) {
-           QStringList anIds = myFacesByNodes->item(i)->text().split( " ", QString::SkipEmptyParts );
-           for (QStringList::iterator it = anIds.begin(); it != anIds.end(); ++it)
-             aNodesIds.Append( (*it).toInt() );
-
-           aQuantities[aNbQuantities++] = anIds.count();
-         }
-
-         anIdsOfNodes->length(aNodesIds.Extent());
-
-         int aNbIdsOfNodes = 0;
-         TColStd_ListIteratorOfListOfInteger It;
-         It.Initialize(aNodesIds);
-         for( ;It.More();It.Next())
-           anIdsOfNodes[aNbIdsOfNodes++] = It.Value();
-           
-         try{
-           SUIT_OverrideCursor aWaitCursor;
-           SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
-           aMeshEditor->AddPolyhedralVolume(anIdsOfNodes, aQuantities);
-         }catch(SALOME::SALOME_Exception& exc){
-           INFOS("Follow exception was cought:\n\t"<<exc.details.text);
-         }catch(std::exception& exc){
-           INFOS("Follow exception was cought:\n\t"<<exc.what());
-         }catch(...){
-           INFOS("Unknown exception was cought !!!");
-         }
-       }
+        {
+          SMESH::long_array_var anIdsOfNodes = new SMESH::long_array;
+          SMESH::long_array_var aQuantities  = new SMESH::long_array;
+
+          aQuantities->length( myFacesByNodes->count() );
+
+          TColStd_ListOfInteger aNodesIds;
+
+          int aNbQuantities = 0;
+          for (int i = 0; i < myFacesByNodes->count(); i++ ) {
+            QStringList anIds = myFacesByNodes->item(i)->text().split( " ", QString::SkipEmptyParts );
+            for (QStringList::iterator it = anIds.begin(); it != anIds.end(); ++it)
+              aNodesIds.Append( (*it).toInt() );
+
+            aQuantities[aNbQuantities++] = anIds.count();
+          }
+
+          anIdsOfNodes->length(aNodesIds.Extent());
+
+          int aNbIdsOfNodes = 0;
+          TColStd_ListIteratorOfListOfInteger It;
+          It.Initialize(aNodesIds);
+          for( ;It.More();It.Next())
+            anIdsOfNodes[aNbIdsOfNodes++] = It.Value();
+            
+          try{
+            SUIT_OverrideCursor aWaitCursor;
+            SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
+            aMeshEditor->AddPolyhedralVolume(anIdsOfNodes, aQuantities);
+          }catch(SALOME::SALOME_Exception& exc){
+            INFOS("Follow exception was cought:\n\t"<<exc.details.text);
+          }catch(std::exception& exc){
+            INFOS("Follow exception was cought:\n\t"<<exc.what());
+          }catch(...){
+            INFOS("Unknown exception was cought !!!");
+          }
+        }
       else if (GetConstructorId() == 1)
-       {
-         SMESH::long_array_var anIdsOfFaces = new SMESH::long_array;
-         
-         QStringList aListId = myEditCurrentArgument->text().split( " ", QString::SkipEmptyParts );
-         anIdsOfFaces->length(aListId.count());
-         for ( int i = 0; i < aListId.count(); i++ )
-           anIdsOfFaces[i] = aListId[i].toInt();
-         
-         try{
-           SUIT_OverrideCursor aWaitCursor;
-           SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
-           aMeshEditor->AddPolyhedralVolumeByFaces(anIdsOfFaces);
-         }catch(SALOME::SALOME_Exception& exc){
-           INFOS("Follow exception was cought:\n\t"<<exc.details.text);
-         }catch(std::exception& exc){
-           INFOS("Follow exception was cought:\n\t"<<exc.what());
-         }catch(...){
-           INFOS("Unknown exception was cought !!!");
-         }
-       }
+        {
+          SMESH::long_array_var anIdsOfFaces = new SMESH::long_array;
+          
+          QStringList aListId = myEditCurrentArgument->text().split( " ", QString::SkipEmptyParts );
+          anIdsOfFaces->length(aListId.count());
+          for ( int i = 0; i < aListId.count(); i++ )
+            anIdsOfFaces[i] = aListId[i].toInt();
+          
+          try{
+            SUIT_OverrideCursor aWaitCursor;
+            SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
+            aMeshEditor->AddPolyhedralVolumeByFaces(anIdsOfFaces);
+          }catch(SALOME::SALOME_Exception& exc){
+            INFOS("Follow exception was cought:\n\t"<<exc.details.text);
+          }catch(std::exception& exc){
+            INFOS("Follow exception was cought:\n\t"<<exc.what());
+          }catch(...){
+            INFOS("Unknown exception was cought !!!");
+          }
+        }
       
       //SALOME_ListIO aList;
       //mySelectionMgr->setSelectedObjects( aList );
       SMESH::UpdateView();
       if( myActor ){
-       unsigned int anEntityMode = myActor->GetEntityMode();
-       myActor->SetEntityMode(SMESH_Actor::eVolumes | anEntityMode);
+        unsigned int anEntityMode = myActor->GetEntityMode();
+        myActor->SetEntityMode(SMESH_Actor::eVolumes | anEntityMode);
       }
       //ConstructorsClicked( GetConstructorId() );
       busy = false;
@@ -507,7 +507,7 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::ClickOnOk()
   ClickOnCancel();
 }
 
-       
+        
 //=================================================================================
 // function : ClickOnCancel()
 // purpose  :
@@ -543,10 +543,10 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::ClickOnHelp()
     platform = "application";
 #endif
     SUIT_MessageBox::warning(this, tr("WRN_WARNING"),
-                            tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
-                            arg(app->resourceMgr()->stringValue("ExternalBrowser",
-                                                                platform)).
-                            arg(myHelpFileName));
+                             tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                             arg(app->resourceMgr()->stringValue("ExternalBrowser",
+                                                                 platform)).
+                             arg(myHelpFileName));
   }
 }
 
@@ -570,67 +570,67 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::onTextChange(const QString& theNewText)
   if (GetConstructorId() == 0)
     {
       if ( aMesh ) {
-       TColStd_MapOfInteger newIndices;
+        TColStd_MapOfInteger newIndices;
       
-       QStringList aListId = theNewText.split( " ", QString::SkipEmptyParts );
-       for ( int i = 0; i < aListId.count(); i++ ) {
-         const SMDS_MeshNode * n = aMesh->FindNode( aListId[ i ].toInt() );
-         if ( n ) {
-           newIndices.Add(n->GetID());
-           myNbOkElements++;
-         }
-       }
+        QStringList aListId = theNewText.split( " ", QString::SkipEmptyParts );
+        for ( int i = 0; i < aListId.count(); i++ ) {
+          const SMDS_MeshNode * n = aMesh->FindNode( aListId[ i ].toInt() );
+          if ( n ) {
+            newIndices.Add(n->GetID());
+            myNbOkElements++;
+          }
+        }
       
-       mySelector->AddOrRemoveIndex( myActor->getIO(), newIndices, false );
+        mySelector->AddOrRemoveIndex( myActor->getIO(), newIndices, false );
       
-       if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
-         aViewWindow->highlight( myActor->getIO(), true, true );
+        if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+          aViewWindow->highlight( myActor->getIO(), true, true );
       
-       if ( myNbOkElements>0 && aListId.count()>=3)
-         AddButton->setEnabled(true);
-       else
-         AddButton->setEnabled(false);
+        if ( myNbOkElements>0 && aListId.count()>=3)
+          AddButton->setEnabled(true);
+        else
+          AddButton->setEnabled(false);
       
-       displaySimulation();
+        displaySimulation();
       }
     } else if (GetConstructorId() == 1)
       {
-       myNbOkElements = 0;
-       buttonOk->setEnabled( false );
-       buttonApply->setEnabled( false );
+        myNbOkElements = 0;
+        buttonOk->setEnabled( false );
+        buttonApply->setEnabled( false );
       
-       // check entered ids of faces and hilight them
-       QStringList aListId;
-       if ( aMesh ) {
-         TColStd_MapOfInteger newIndices;
+        // check entered ids of faces and hilight them
+        QStringList aListId;
+        if ( aMesh ) {
+          TColStd_MapOfInteger newIndices;
       
-         aListId = theNewText.split( " ", QString::SkipEmptyParts );
-
-         for ( int i = 0; i < aListId.count(); i++ ) {
-           const SMDS_MeshElement * e = aMesh->FindElement( aListId[ i ].toInt() );
-           if ( e ) {
-             newIndices.Add(e->GetID());
-             myNbOkElements++;  
-           }
-         }
-
-         mySelector->AddOrRemoveIndex( myActor->getIO(), newIndices, false );
-         if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
-           aViewWindow->highlight( myActor->getIO(), true, true );
+          aListId = theNewText.split( " ", QString::SkipEmptyParts );
+
+          for ( int i = 0; i < aListId.count(); i++ ) {
+            const SMDS_MeshElement * e = aMesh->FindElement( aListId[ i ].toInt() );
+            if ( e ) {
+              newIndices.Add(e->GetID());
+              myNbOkElements++;  
+            }
+          }
+
+          mySelector->AddOrRemoveIndex( myActor->getIO(), newIndices, false );
+          if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+            aViewWindow->highlight( myActor->getIO(), true, true );
       
-         if ( myNbOkElements ) {
-           if (aListId.count()>1){ 
-             buttonOk->setEnabled( true );
-             buttonApply->setEnabled( true );
-           }
-           else{
-             buttonOk->setEnabled( false );
-             buttonApply->setEnabled( false );
-           }
-           if(aListId.count()>1)
-             displaySimulation();
-         }
-       }
+          if ( myNbOkElements ) {
+            if (aListId.count()>1){ 
+              buttonOk->setEnabled( true );
+              buttonApply->setEnabled( true );
+            }
+            else{
+              buttonOk->setEnabled( false );
+              buttonApply->setEnabled( false );
+            }
+            if(aListId.count()>1)
+              displaySimulation();
+          }
+        }
       }
   busy = false;
 }
@@ -749,13 +749,13 @@ int SMESHGUI_CreatePolyhedralVolumeDlg::checkEditLine(bool checkLast)
     case 0:{ // nodes
       const SMDS_MeshNode    * aNode = aMesh->FindNode( aListId[ i ].toInt() );
       if( !aNode ){
-       SUIT_MessageBox::warning(this,
-                                tr("SMESH_POLYEDRE_CREATE_ERROR"),
-                                tr("The incorrect indices of nodes!"));
-       
-       myEditCurrentArgument->clear();
-       myEditCurrentArgument->setText( aString );
-       return -1;
+        SUIT_MessageBox::warning(this,
+                                 tr("SMESH_POLYEDRE_CREATE_ERROR"),
+                                 tr("The incorrect indices of nodes!"));
+        
+        myEditCurrentArgument->clear();
+        myEditCurrentArgument->setText( aString );
+        return -1;
       }
 
       break;
@@ -764,24 +764,24 @@ int SMESHGUI_CreatePolyhedralVolumeDlg::checkEditLine(bool checkLast)
       bool aElemIsOK = true;
       const SMDS_MeshElement * aElem = aMesh->FindElement( aListId[ i ].toInt() );
       if (!aElem)
-       {
-         aElemIsOK = false;
-       }
+        {
+          aElemIsOK = false;
+        }
       else
-       {
-         SMDSAbs_ElementType aType = aMesh->GetElementType( aElem->GetID(),true );
-         if (aType != SMDSAbs_Face){
-           aElemIsOK = false;
-         }
-       }
+        {
+          SMDSAbs_ElementType aType = aMesh->GetElementType( aElem->GetID(),true );
+          if (aType != SMDSAbs_Face){
+            aElemIsOK = false;
+          }
+        }
       if (!aElemIsOK){
-       SUIT_MessageBox::warning(this,
-                                tr("SMESH_POLYEDRE_CREATE_ERROR"),
-                                tr("The incorrect indices of faces!"));
-       
-       myEditCurrentArgument->clear();
-       myEditCurrentArgument->setText( aString );
-       return -1;
+        SUIT_MessageBox::warning(this,
+                                 tr("SMESH_POLYEDRE_CREATE_ERROR"),
+                                 tr("The incorrect indices of faces!"));
+        
+        myEditCurrentArgument->clear();
+        myEditCurrentArgument->setText( aString );
+        return -1;
       }
       break;
     }
@@ -804,66 +804,66 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::displaySimulation()
       vtkIdType aType = VTK_CONVEX_POINT_SET;
       SMDS_Mesh* aMesh = 0;
       if ( myActor ){
-       aMesh = myActor->GetObject()->GetMesh();
+        aMesh = myActor->GetObject()->GetMesh();
       }
       if (GetConstructorId() == 0 && aMesh){
-       if (!AddButton->isEnabled()){
-         mySimulation->ResetGrid(true);
-         for (int i = 0; i < myFacesByNodes->count(); i++) {
-           QStringList anIds = myFacesByNodes->item(i)->text().split( " ", QString::SkipEmptyParts );
-           SMESH::TPolySimulation::TVTKIds aVTKIds_faces;
-           for (QStringList::iterator it = anIds.begin(); it != anIds.end(); ++it){
-             const SMDS_MeshNode* aNode = aMesh->FindNode( (*it).toInt() );
-             if (!aNode) continue;
-             vtkIdType aId = myActor->GetObject()->GetNodeVTKId( (*it).toInt() );
-             aVTKIds.push_back(aId);
-             aVTKIds_faces.push_back(aId);
-           }
-           if(!Preview->isChecked()){
-             aType = VTK_POLYGON;
-             mySimulation->SetPosition(myActor, aType, aVTKIds_faces,false);
-           }
-         }
-         if(myFacesByNodes->count() == 0){
-           mySimulation->SetVisibility(false);
-         } else {
-           mySimulation->SetVisibility(true);
-         }
-         if(Preview->isChecked()){
-           mySimulation->SetPosition(myActor, aType, aVTKIds);
-         }
-       } else {
-         // add ids from edit line
-         QStringList anEditIds = myEditCurrentArgument->text().split( " ", QString::SkipEmptyParts );
-         for ( int i = 0; i < anEditIds.count(); i++ )
-           aVTKIds.push_back( myActor->GetObject()->GetNodeVTKId( anEditIds[ i ].toInt() ));
-         aType = VTK_POLYGON;
-         mySimulation->SetPosition(myActor, aType, aVTKIds);
-       }
+        if (!AddButton->isEnabled()){
+          mySimulation->ResetGrid(true);
+          for (int i = 0; i < myFacesByNodes->count(); i++) {
+            QStringList anIds = myFacesByNodes->item(i)->text().split( " ", QString::SkipEmptyParts );
+            SMESH::TPolySimulation::TVTKIds aVTKIds_faces;
+            for (QStringList::iterator it = anIds.begin(); it != anIds.end(); ++it){
+              const SMDS_MeshNode* aNode = aMesh->FindNode( (*it).toInt() );
+              if (!aNode) continue;
+              vtkIdType aId = myActor->GetObject()->GetNodeVTKId( (*it).toInt() );
+              aVTKIds.push_back(aId);
+              aVTKIds_faces.push_back(aId);
+            }
+            if(!Preview->isChecked()){
+              aType = VTK_POLYGON;
+              mySimulation->SetPosition(myActor, aType, aVTKIds_faces,false);
+            }
+          }
+          if(myFacesByNodes->count() == 0){
+            mySimulation->SetVisibility(false);
+          } else {
+            mySimulation->SetVisibility(true);
+          }
+          if(Preview->isChecked()){
+            mySimulation->SetPosition(myActor, aType, aVTKIds);
+          }
+        } else {
+          // add ids from edit line
+          QStringList anEditIds = myEditCurrentArgument->text().split( " ", QString::SkipEmptyParts );
+          for ( int i = 0; i < anEditIds.count(); i++ )
+            aVTKIds.push_back( myActor->GetObject()->GetNodeVTKId( anEditIds[ i ].toInt() ));
+          aType = VTK_POLYGON;
+          mySimulation->SetPosition(myActor, aType, aVTKIds);
+        }
       }else if(GetConstructorId() == 1 && aMesh){
-       QStringList aListId = myEditCurrentArgument->text().split( " ", QString::SkipEmptyParts );
-       for ( int i = 0; i < aListId.count(); i++ )
-         {
-           const SMDS_MeshElement * anElem = aMesh->FindElement( aListId[ i ].toInt() );
-           if ( !anElem ) continue;
-           SMDSAbs_ElementType aFaceType = aMesh->GetElementType( anElem->GetID(),true );
-           if (aFaceType != SMDSAbs_Face) continue;
-             
-           SMDS_ElemIteratorPtr anIter = anElem->nodesIterator();
-           SMESH::TPolySimulation::TVTKIds aVTKIds_faces;
-           while( anIter->more() )
-             if ( const SMDS_MeshNode* aNode = (SMDS_MeshNode*)anIter->next() ){
-               vtkIdType aId = myActor->GetObject()->GetNodeVTKId( aNode->GetID() );
-               aVTKIds.push_back(aId);
-               aVTKIds_faces.push_back(aId);
-             }
-           if(!Preview->isChecked()){
-             aType = VTK_POLYGON;
-             mySimulation->SetPosition(myActor, aType, aVTKIds_faces);
-           }
-         }
-       if(Preview->isChecked())
-         mySimulation->SetPosition(myActor, aType, aVTKIds);
+        QStringList aListId = myEditCurrentArgument->text().split( " ", QString::SkipEmptyParts );
+        for ( int i = 0; i < aListId.count(); i++ )
+          {
+            const SMDS_MeshElement * anElem = aMesh->FindElement( aListId[ i ].toInt() );
+            if ( !anElem ) continue;
+            SMDSAbs_ElementType aFaceType = aMesh->GetElementType( anElem->GetID(),true );
+            if (aFaceType != SMDSAbs_Face) continue;
+              
+            SMDS_ElemIteratorPtr anIter = anElem->nodesIterator();
+            SMESH::TPolySimulation::TVTKIds aVTKIds_faces;
+            while( anIter->more() )
+              if ( const SMDS_MeshNode* aNode = (SMDS_MeshNode*)anIter->next() ){
+                vtkIdType aId = myActor->GetObject()->GetNodeVTKId( aNode->GetID() );
+                aVTKIds.push_back(aId);
+                aVTKIds_faces.push_back(aId);
+              }
+            if(!Preview->isChecked()){
+              aType = VTK_POLYGON;
+              mySimulation->SetPosition(myActor, aType, aVTKIds_faces);
+            }
+          }
+        if(Preview->isChecked())
+          mySimulation->SetPosition(myActor, aType, aVTKIds);
       }
       SMESH::UpdateView();
     }
index 6e2a106a244b79dd743e9cc90c6de371c518d177..1922e70deab2a5cadf395655f4e18650979800ba 100644 (file)
@@ -189,7 +189,7 @@ bool SMESHGUI_DeleteGroupDlg::isValid()
 {
   if (myListBox->count() == 0) {
     SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_INSUFFICIENT_DATA"),
-                                tr("NO_SELECTED_GROUPS"));
+                                 tr("NO_SELECTED_GROUPS"));
     return false;
   }
 
@@ -266,10 +266,10 @@ void SMESHGUI_DeleteGroupDlg::onHelp()
     platform = "application";
 #endif
     SUIT_MessageBox::warning(this, tr("WRN_WARNING"),
-                            tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
-                            arg(app->resourceMgr()->stringValue("ExternalBrowser", 
-                                                                platform)).
-                            arg(myHelpFileName));
+                             tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                             arg(app->resourceMgr()->stringValue("ExternalBrowser", 
+                                                                 platform)).
+                             arg(myHelpFileName));
   }
 }
 
index 613fbb9e4349512b65c611b9c7b4d371140b999a..0b41a00d0a20c63f7e3e5fb18d7a2155adafe88a 100644 (file)
@@ -59,16 +59,16 @@ SALOME_Prs* SMESHGUI_Displayer::buildPresentation( const QString& entry, SALOME_
       SUIT_ViewWindow* wnd = vtk_viewer->getViewManager()->getActiveView();
       SMESH_Actor* anActor = SMESH::FindActorByEntry( wnd, entry.toLatin1().data() );
       if( !anActor )
-       anActor = SMESH::CreateActor( study()->studyDS(), entry.toLatin1().data(), true );
+        anActor = SMESH::CreateActor( study()->studyDS(), entry.toLatin1().data(), true );
       if( anActor )
       {
-       SMESH::DisplayActor( wnd, anActor );
+        SMESH::DisplayActor( wnd, anActor );
         prs = LightApp_Displayer::buildPresentation( entry.toLatin1().data(), aViewFrame );
       }
       if( prs )
-       UpdatePrs( prs );
+        UpdatePrs( prs );
       else if( anActor )
-       SMESH::RemoveActor( vtk_viewer->getViewManager()->getActiveView(), anActor );
+        SMESH::RemoveActor( vtk_viewer->getViewManager()->getActiveView(), anActor );
     }
   }
 
index c8aa3710d2feee3cbab5bfc885446167c9a7096b..5c84c204b21e0656ad24293091323b7b2b13cb12 100644 (file)
@@ -169,7 +169,7 @@ namespace SMESH
     }
 
     void SetPointsData ( SMDS_Mesh* theMesh, 
-                        TColStd_MapOfInteger & theNodesIdMap )
+                         TColStd_MapOfInteger & theNodesIdMap )
     {
       vtkPoints* aPoints = vtkPoints::New();
       aPoints->SetNumberOfPoints(theNodesIdMap.Extent());
@@ -177,9 +177,9 @@ namespace SMESH
       
       TColStd_MapIteratorOfMapOfInteger idIter( theNodesIdMap );
       for( int i = 0; idIter.More(); idIter.Next(), i++ ) {
-       const SMDS_MeshNode* aNode = theMesh->FindNode(idIter.Key());
-       aPoints->SetPoint( i, aNode->X(), aNode->Y(), aNode->Z() );
-       myIDs.push_back(idIter.Key());
+        const SMDS_MeshNode* aNode = theMesh->FindNode(idIter.Key());
+        aPoints->SetPoint( i, aNode->X(), aNode->Y(), aNode->Z() );
+        myIDs.push_back(idIter.Key());
       }
 
       myIdGrid->SetPoints(aPoints);
@@ -190,7 +190,7 @@ namespace SMESH
     }
 
     void SetElemsData( TColStd_MapOfInteger & theElemsIdMap, 
-                      std::list<gp_XYZ> & aGrCentersXYZ )
+                       std::list<gp_XYZ> & aGrCentersXYZ )
     {
       vtkPoints* aPoints = vtkPoints::New();
       aPoints->SetNumberOfPoints(theElemsIdMap.Extent());
@@ -198,14 +198,14 @@ namespace SMESH
       
       TColStd_MapIteratorOfMapOfInteger idIter( theElemsIdMap );
       for( ; idIter.More(); idIter.Next() ) {
-       myIDs.push_back(idIter.Key());
+        myIDs.push_back(idIter.Key());
       }
 
       gp_XYZ aXYZ;
       std::list<gp_XYZ>::iterator coordIt = aGrCentersXYZ.begin();
       for( int i = 0; coordIt != aGrCentersXYZ.end(); coordIt++, i++ ) {
-       aXYZ = *coordIt;
-       aPoints->SetPoint( i, aXYZ.X(), aXYZ.Y(), aXYZ.Z() );
+        aXYZ = *coordIt;
+        aPoints->SetPoint( i, aXYZ.X(), aXYZ.Y(), aXYZ.Z() );
       }
       myIdGrid->SetPoints(aPoints);
       aPoints->Delete();
@@ -234,20 +234,20 @@ namespace SMESH
       myIsPointsLabeled = theIsPointsLabeled && myIdGrid->GetNumberOfPoints();
       
       if ( myIsPointsLabeled ) {
-       myPointsNumDataSet->ShallowCopy(myIdGrid);
-       vtkDataSet *aDataSet = myPointsNumDataSet;
-       int aNbElem = myIDs.size();
-       vtkIntArray *anArray = vtkIntArray::New();
-       anArray->SetNumberOfValues( aNbElem );
-       for ( int i = 0; i < aNbElem; i++ )
-         anArray->SetValue( i, myIDs[i] );
-       aDataSet->GetPointData()->SetScalars( anArray );
-       anArray->Delete();
-       myPtsMaskPoints->SetInput( aDataSet );
-       myPointLabels->SetVisibility( theIsActorVisible );
+        myPointsNumDataSet->ShallowCopy(myIdGrid);
+        vtkDataSet *aDataSet = myPointsNumDataSet;
+        int aNbElem = myIDs.size();
+        vtkIntArray *anArray = vtkIntArray::New();
+        anArray->SetNumberOfValues( aNbElem );
+        for ( int i = 0; i < aNbElem; i++ )
+          anArray->SetValue( i, myIDs[i] );
+        aDataSet->GetPointData()->SetScalars( anArray );
+        anArray->Delete();
+        myPtsMaskPoints->SetInput( aDataSet );
+        myPointLabels->SetVisibility( theIsActorVisible );
       }
       else {
-       myPointLabels->SetVisibility( false );
+        myPointLabels->SetVisibility( false );
       }
     }
     
@@ -270,7 +270,7 @@ namespace SMESH
       //myPtsSelectVisiblePoints->UnRegisterAllOutputs(); //vtk 5.0 porting
       myPtsSelectVisiblePoints->Delete();
 
-      //myPtsMaskPoints->UnRegisterAllOutputs();         //vtk 5.0 porting
+      //myPtsMaskPoints->UnRegisterAllOutputs();          //vtk 5.0 porting
       myPtsMaskPoints->Delete();
 
       myPointLabels->Delete();
@@ -282,8 +282,8 @@ namespace SMESH
 
 static const char * IconFirst[] = {
 "18 10 2 1",
-"      g None",
-".     g #000000",
+"       g None",
+".      g #000000",
 "         .     .  ",
 "  ..    ..    ..  ",
 "  ..   ...   ...  ",
@@ -300,7 +300,7 @@ static const char * IconFirst[] = {
 // purpose  :
 //=================================================================================
 SMESHGUI_EditMeshDlg::SMESHGUI_EditMeshDlg (SMESHGUI* theModule, 
-                                           int theAction)
+                                            int theAction)
   : QDialog(SMESH::GetDesktop(theModule)),
     mySMESHGUI(theModule),
     mySelectionMgr(SMESH::GetSelectionMgr(theModule)),
@@ -327,9 +327,9 @@ SMESHGUI_EditMeshDlg::SMESHGUI_EditMeshDlg (SMESHGUI* theModule,
 
   /***************************************************************/
   GroupConstructors = new QGroupBox(myAction == 1 ? 
-                                   tr("SMESH_MERGE_ELEMENTS") : 
-                                   tr("SMESH_MERGE_NODES"), 
-                                   this);
+                                    tr("SMESH_MERGE_ELEMENTS") : 
+                                    tr("SMESH_MERGE_NODES"), 
+                                    this);
 
   QButtonGroup* ButtonGroup = new QButtonGroup(this);
   QHBoxLayout* GroupConstructorsLayout = new QHBoxLayout(GroupConstructors);
@@ -362,9 +362,9 @@ SMESHGUI_EditMeshDlg::SMESHGUI_EditMeshDlg (SMESHGUI* theModule,
   /***************************************************************/
   // Controls for coincident elements detecting
   GroupCoincident = new QGroupBox(myAction == 1 ? 
-                                 tr("COINCIDENT_ELEMENTS") : 
-                                 tr("COINCIDENT_NODES"), 
-                                 this);
+                                  tr("COINCIDENT_ELEMENTS") : 
+                                  tr("COINCIDENT_NODES"), 
+                                  this);
 
   QGridLayout* GroupCoincidentLayout = new QGridLayout(GroupCoincident);
   GroupCoincidentLayout->setSpacing(SPACING);
@@ -542,7 +542,7 @@ void SMESHGUI_EditMeshDlg::Init()
 // purpose  :
 //=================================================================================
 void SMESHGUI_EditMeshDlg::FindGravityCenter(TColStd_MapOfInteger & theElemsIdMap, 
-                                            std::list< gp_XYZ > & theGrCentersXYZ)
+                                             std::list< gp_XYZ > & theGrCentersXYZ)
 {
   if (!myActor)
     return;
@@ -659,10 +659,10 @@ void SMESHGUI_EditMeshDlg::ClickOnHelp()
     platform = "application";
 #endif
     SUIT_MessageBox::warning(this, tr("WRN_WARNING"),
-                            tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
-                            arg(app->resourceMgr()->stringValue("ExternalBrowser", 
-                                                                platform)).
-                            arg(myHelpFileName));
+                             tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                             arg(app->resourceMgr()->stringValue("ExternalBrowser", 
+                                                                 platform)).
+                             arg(myHelpFileName));
   }
 }
 
@@ -722,15 +722,15 @@ void SMESHGUI_EditMeshDlg::onDetect()
     switch (myAction) {
     case 0 :
       if(!mySubMeshOrGroup->_is_nil())
-       aMeshEditor->FindCoincidentNodesOnPart(mySubMeshOrGroup, SpinBoxTolerance->GetValue(), aGroupsArray);
+        aMeshEditor->FindCoincidentNodesOnPart(mySubMeshOrGroup, SpinBoxTolerance->GetValue(), aGroupsArray);
       else
-       aMeshEditor->FindCoincidentNodes(SpinBoxTolerance->GetValue(), aGroupsArray);
+        aMeshEditor->FindCoincidentNodes(SpinBoxTolerance->GetValue(), aGroupsArray);
       break;
     case 1 :
       if(!mySubMeshOrGroup->_is_nil())
-       aMeshEditor->FindEqualElements(mySubMeshOrGroup, aGroupsArray);
+        aMeshEditor->FindEqualElements(mySubMeshOrGroup, aGroupsArray);
       else
-       aMeshEditor->FindEqualElements(myMesh, aGroupsArray);
+        aMeshEditor->FindEqualElements(myMesh, aGroupsArray);
       break;
     }
     
@@ -739,7 +739,7 @@ void SMESHGUI_EditMeshDlg::onDetect()
 
       QStringList anIDs;
       for (int j = 0; j < aGroup.length(); j++)
-       anIDs.append(QString::number(aGroup[j]));
+        anIDs.append(QString::number(aGroup[j]));
 
       ListCoincident->addItem(anIDs.join(" "));
     }
@@ -1044,11 +1044,11 @@ void SMESHGUI_EditMeshDlg::SelectionIntoArgument()
     if (myAction == 0) {
       SMESH::SetPointRepresentation(true);
       if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
-       aViewWindow->SetSelectionMode(NodeSelection);
+        aViewWindow->SetSelectionMode(NodeSelection);
     }
     else
       if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
-       aViewWindow->SetSelectionMode(CellSelection);
+        aViewWindow->SetSelectionMode(CellSelection);
   }
 }
 
index c683010169be7a20c00dbe1afb89ea4fead156e6..2131b25e6c403ce886222b302a82541b1ecc1090 100644 (file)
@@ -354,9 +354,9 @@ SMESHGUI_ExtrusionAlongPathDlg::SMESHGUI_ExtrusionAlongPathDlg( SMESHGUI* theMod
   connect(mySMESHGUI,  SIGNAL(SignalCloseAllDialogs()),        this, SLOT(reject()));
 
   connect(ElementsLineEdit, SIGNAL(textChanged(const QString&)),
-         SLOT(onTextChange(const QString&)));
+          SLOT(onTextChange(const QString&)));
   connect(StartPointLineEdit, SIGNAL(textChanged(const QString&)),
-         SLOT(onTextChange(const QString&)));
+          SLOT(onTextChange(const QString&)));
 
   connect(MeshCheck,      SIGNAL(toggled(bool)), SLOT(onSelectMesh()));
 
@@ -440,19 +440,19 @@ void SMESHGUI_ExtrusionAlongPathDlg::ConstructorsClicked (int type)
     SMESH::SetPointRepresentation(false);
     if (MeshCheck->isChecked()) {
       if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
-       aViewWindow->SetSelectionMode(ActorSelection);
+        aViewWindow->SetSelectionMode(ActorSelection);
       mySelectionMgr->installFilter(myElementsFilter);
     } else {
       if (type == 0)
-       {
-         if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
-           aViewWindow->SetSelectionMode(EdgeSelection);
-       }
+        {
+          if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+            aViewWindow->SetSelectionMode(EdgeSelection);
+        }
       if (type == 1)
-       {
-         if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
-           aViewWindow->SetSelectionMode(FaceSelection);
-       }
+        {
+          if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+            aViewWindow->SetSelectionMode(FaceSelection);
+        }
     }
   }
   connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
@@ -492,16 +492,16 @@ bool SMESHGUI_ExtrusionAlongPathDlg::ClickOnApply()
       bool bOk;
       int j = 0;
       for (int i = 0; i < aListElementsId.count(); i++) {
-       long ind = aListElementsId[ i ].toLong(&bOk);
-       if  (bOk) {
-         const SMDS_MeshElement* e = aMesh->FindElement(ind);
-         if (e) {
-           bool typeMatch = Elements1dRB->isChecked() && e->GetType() == SMDSAbs_Edge ||
-                            Elements2dRB->isChecked() && e->GetType() == SMDSAbs_Face;
-           if (typeMatch)
-             anElementsId[ j++ ] = ind;
-         }
-       }
+        long ind = aListElementsId[ i ].toLong(&bOk);
+        if  (bOk) {
+          const SMDS_MeshElement* e = aMesh->FindElement(ind);
+          if (e) {
+            bool typeMatch = Elements1dRB->isChecked() && e->GetType() == SMDSAbs_Edge ||
+                             Elements2dRB->isChecked() && e->GetType() == SMDSAbs_Face;
+            if (typeMatch)
+              anElementsId[ j++ ] = ind;
+          }
+        }
       }
       anElementsId->length(j);
     }
@@ -559,44 +559,44 @@ bool SMESHGUI_ExtrusionAlongPathDlg::ClickOnApply()
     /*
     if ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() ) {
       if( MeshCheck->isChecked() ) {
-       if( GetConstructorId() == 0 )
-         SMESH::ListOfGroups_var groups = 
-           aMeshEditor->ExtrusionAlongPathObject1DMakeGroups(myIDSource, myPathMesh,
-                                                             myPathShape, aNodeStart,
-                                                             AnglesGrp->isChecked(), anAngles,
-                                                             BasePointGrp->isChecked(), aBasePoint, retVal);
-       else
-         SMESH::ListOfGroups_var groups = 
-           aMeshEditor->ExtrusionAlongPathObject2DMakeGroups(myIDSource, myPathMesh,
-                                                             myPathShape, aNodeStart,
-                                                             AnglesGrp->isChecked(), anAngles,
-                                                             BasePointGrp->isChecked(), aBasePoint, retVal);
+        if( GetConstructorId() == 0 )
+          SMESH::ListOfGroups_var groups = 
+            aMeshEditor->ExtrusionAlongPathObject1DMakeGroups(myIDSource, myPathMesh,
+                                                              myPathShape, aNodeStart,
+                                                              AnglesGrp->isChecked(), anAngles,
+                                                              BasePointGrp->isChecked(), aBasePoint, retVal);
+        else
+          SMESH::ListOfGroups_var groups = 
+            aMeshEditor->ExtrusionAlongPathObject2DMakeGroups(myIDSource, myPathMesh,
+                                                              myPathShape, aNodeStart,
+                                                              AnglesGrp->isChecked(), anAngles,
+                                                              BasePointGrp->isChecked(), aBasePoint, retVal);
       }
       else
-       SMESH::ListOfGroups_var groups = 
-         aMeshEditor->ExtrusionAlongPathMakeGroups(anElementsId, myPathMesh,
-                                                   myPathShape, aNodeStart,
-                                                   AnglesGrp->isChecked(), anAngles,
-                                                   BasePointGrp->isChecked(), aBasePoint, retVal);
+        SMESH::ListOfGroups_var groups = 
+          aMeshEditor->ExtrusionAlongPathMakeGroups(anElementsId, myPathMesh,
+                                                    myPathShape, aNodeStart,
+                                                    AnglesGrp->isChecked(), anAngles,
+                                                    BasePointGrp->isChecked(), aBasePoint, retVal);
     }
     else {
       if( MeshCheck->isChecked() ) {
-       if( GetConstructorId() == 0 )
-         retVal = aMeshEditor->ExtrusionAlongPathObject1D(myIDSource, myPathMesh,
-                                                          myPathShape, aNodeStart,
-                                                          AnglesGrp->isChecked(), anAngles,
-                                                          BasePointGrp->isChecked(), aBasePoint);
-       else
-         retVal = aMeshEditor->ExtrusionAlongPathObject2D(myIDSource, myPathMesh,
-                                                          myPathShape, aNodeStart,
-                                                          AnglesGrp->isChecked(), anAngles,
-                                                          BasePointGrp->isChecked(), aBasePoint);
+        if( GetConstructorId() == 0 )
+          retVal = aMeshEditor->ExtrusionAlongPathObject1D(myIDSource, myPathMesh,
+                                                           myPathShape, aNodeStart,
+                                                           AnglesGrp->isChecked(), anAngles,
+                                                           BasePointGrp->isChecked(), aBasePoint);
+        else
+          retVal = aMeshEditor->ExtrusionAlongPathObject2D(myIDSource, myPathMesh,
+                                                           myPathShape, aNodeStart,
+                                                           AnglesGrp->isChecked(), anAngles,
+                                                           BasePointGrp->isChecked(), aBasePoint);
       }
       else
-       retVal = aMeshEditor->ExtrusionAlongPath(anElementsId, myPathMesh,
-                                                myPathShape, aNodeStart,
-                                                AnglesGrp->isChecked(), anAngles,
-                                                BasePointGrp->isChecked(), aBasePoint);
+        retVal = aMeshEditor->ExtrusionAlongPath(anElementsId, myPathMesh,
+                                                 myPathShape, aNodeStart,
+                                                 AnglesGrp->isChecked(), anAngles,
+                                                 BasePointGrp->isChecked(), aBasePoint);
     }
     */
 
@@ -606,17 +606,17 @@ bool SMESHGUI_ExtrusionAlongPathDlg::ClickOnApply()
       ElemType = SMESH::EDGE;
     if( !MeshCheck->isChecked() ) {
       SMESH::ListOfGroups_var groups = 
-       aMeshEditor->ExtrusionAlongPathX(anElementsId, myPath, aNodeStart, AnglesGrp->isChecked(),
-                                        anAngles, LinearAnglesCheck->isChecked(),
-                                        BasePointGrp->isChecked(), aBasePoint,
-                                        NeedGroups, ElemType, retVal);
+        aMeshEditor->ExtrusionAlongPathX(anElementsId, myPath, aNodeStart, AnglesGrp->isChecked(),
+                                         anAngles, LinearAnglesCheck->isChecked(),
+                                         BasePointGrp->isChecked(), aBasePoint,
+                                         NeedGroups, ElemType, retVal);
     }
     else {
       SMESH::ListOfGroups_var groups = 
-       aMeshEditor->ExtrusionAlongPathObjX(myIDSource, myPath, aNodeStart, AnglesGrp->isChecked(),
-                                         anAngles, LinearAnglesCheck->isChecked(),
-                                         BasePointGrp->isChecked(), aBasePoint,
-                                         NeedGroups, ElemType, retVal);
+        aMeshEditor->ExtrusionAlongPathObjX(myIDSource, myPath, aNodeStart, AnglesGrp->isChecked(),
+                                          anAngles, LinearAnglesCheck->isChecked(),
+                                          BasePointGrp->isChecked(), aBasePoint,
+                                          NeedGroups, ElemType, retVal);
     }
 
 
@@ -628,33 +628,33 @@ bool SMESHGUI_ExtrusionAlongPathDlg::ClickOnApply()
     switch (retVal) {
     case SMESH::SMESH_MeshEditor::EXTR_NO_ELEMENTS:
       SUIT_MessageBox::warning(this,
-                              tr("SMESH_ERROR"),
-                              tr("NO_ELEMENTS_SELECTED"));
+                               tr("SMESH_ERROR"),
+                               tr("NO_ELEMENTS_SELECTED"));
       return false; break;
     case SMESH::SMESH_MeshEditor::EXTR_PATH_NOT_EDGE:
       SUIT_MessageBox::warning(this,
-                              tr("SMESH_ERROR"),
-                              tr("SELECTED_PATH_IS_NOT_EDGE"));
+                               tr("SMESH_ERROR"),
+                               tr("SELECTED_PATH_IS_NOT_EDGE"));
       return false; break;
     case SMESH::SMESH_MeshEditor::EXTR_BAD_PATH_SHAPE:
       SUIT_MessageBox::warning(this,
-                              tr("SMESH_ERROR"),
-                              tr("BAD_SHAPE_TYPE"));
+                               tr("SMESH_ERROR"),
+                               tr("BAD_SHAPE_TYPE"));
       return false; break;
     case SMESH::SMESH_MeshEditor::EXTR_BAD_STARTING_NODE:
       SUIT_MessageBox::warning(this,
-                              tr("SMESH_ERROR"),
-                              tr("EXTR_BAD_STARTING_NODE"));
+                               tr("SMESH_ERROR"),
+                               tr("EXTR_BAD_STARTING_NODE"));
       return false; break;
     case SMESH::SMESH_MeshEditor::EXTR_BAD_ANGLES_NUMBER:
       SUIT_MessageBox::warning(this,
-                              tr("SMESH_ERROR"),
-                              tr("WRONG_ANGLES_NUMBER"));
+                               tr("SMESH_ERROR"),
+                               tr("WRONG_ANGLES_NUMBER"));
       return false; break;
     case SMESH::SMESH_MeshEditor::EXTR_CANT_GET_TANGENT:
       SUIT_MessageBox::warning(this,
-                              tr("SMESH_ERROR"),
-                              tr("CANT_GET_TANGENT"));
+                               tr("SMESH_ERROR"),
+                               tr("CANT_GET_TANGENT"));
       return false; break;
     case SMESH::SMESH_MeshEditor::EXTR_OK:
       break;
@@ -700,10 +700,10 @@ void SMESHGUI_ExtrusionAlongPathDlg::ClickOnHelp()
     platform = "application";
 #endif
     SUIT_MessageBox::warning(this, tr("WRN_WARNING"),
-                            tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
-                            arg(app->resourceMgr()->stringValue("ExternalBrowser", 
-                                                                platform)).
-                            arg(myHelpFileName));
+                             tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                             arg(app->resourceMgr()->stringValue("ExternalBrowser", 
+                                                                 platform)).
+                             arg(myHelpFileName));
   }
 }
 
@@ -762,21 +762,21 @@ void SMESHGUI_ExtrusionAlongPathDlg::onTextChange (const QString& theNewText)
       const Handle(SALOME_InteractiveObject)& anIO = myMeshActor->getIO();
       TColStd_MapOfInteger newIndices;
       for (int i = 0; i < aListId.count(); i++) {
-       long ind = aListId[ i ].toLong(&bOk);
-       if (bOk) {
-         const SMDS_MeshElement* e = aMesh->FindElement(ind);
-         if (e) {
-           // check also type of element
-           bool typeMatch = Elements1dRB->isChecked() && e->GetType() == SMDSAbs_Edge ||
-                            Elements2dRB->isChecked() && e->GetType() == SMDSAbs_Face;
-           if (typeMatch)
-             newIndices.Add(e->GetID());
-         }
-       }
+        long ind = aListId[ i ].toLong(&bOk);
+        if (bOk) {
+          const SMDS_MeshElement* e = aMesh->FindElement(ind);
+          if (e) {
+            // check also type of element
+            bool typeMatch = Elements1dRB->isChecked() && e->GetType() == SMDSAbs_Edge ||
+                             Elements2dRB->isChecked() && e->GetType() == SMDSAbs_Face;
+            if (typeMatch)
+              newIndices.Add(e->GetID());
+          }
+        }
       }
       mySelector->AddOrRemoveIndex(anIO, newIndices, false);
       if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
-       aViewWindow->highlight( anIO, true, true );
+        aViewWindow->highlight( anIO, true, true );
     }
   }
   else if (send == StartPointLineEdit &&
@@ -785,27 +785,27 @@ void SMESHGUI_ExtrusionAlongPathDlg::onTextChange (const QString& theNewText)
       SMESH_Actor* aPathActor = SMESH::FindActorByObject(myPath);
       SMDS_Mesh* aMesh = 0;
       if (aPathActor)
-       aMesh = aPathActor->GetObject()->GetMesh();
+        aMesh = aPathActor->GetObject()->GetMesh();
       if (aMesh) {
-       //mySelectionMgr->clearSelected();
-       //mySelectionMgr->AddIObject(aPathActor->getIO());
+        //mySelectionMgr->clearSelected();
+        //mySelectionMgr->AddIObject(aPathActor->getIO());
         SALOME_ListIO aList;
         aList.Append(aPathActor->getIO());
         mySelectionMgr->setSelectedObjects(aList, false);
 
-       bool bOk;
-       long ind = theNewText.toLong(&bOk);
-       if (bOk) {
-         const SMDS_MeshNode* n = aMesh->FindNode(ind);
-         if (n) {
-           //if (!mySelectionMgr->IsIndexSelected(aPathActor->getIO(), n->GetID())) {
+        bool bOk;
+        long ind = theNewText.toLong(&bOk);
+        if (bOk) {
+          const SMDS_MeshNode* n = aMesh->FindNode(ind);
+          if (n) {
+            //if (!mySelectionMgr->IsIndexSelected(aPathActor->getIO(), n->GetID())) {
             TColStd_MapOfInteger newIndices;
-           newIndices.Add(n->GetID());
-           mySelector->AddOrRemoveIndex( aPathActor->getIO(), newIndices, false );
-           if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
-             aViewWindow->highlight( aPathActor->getIO(), true, true );
-         }
-       }
+            newIndices.Add(n->GetID());
+            mySelector->AddOrRemoveIndex( aPathActor->getIO(), newIndices, false );
+            if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+              aViewWindow->highlight( aPathActor->getIO(), true, true );
+          }
+        }
       }
     }
   }
@@ -929,10 +929,10 @@ void SMESHGUI_ExtrusionAlongPathDlg::SelectionIntoArgument()
     TopoDS_Vertex aVertex;
     if (!aGeomObj->_is_nil()) {
       if (aGeomObj->IsShape() && GEOMBase::GetShape(aGeomObj, aVertex) && !aVertex.IsNull()) {
-       gp_Pnt aPnt = BRep_Tool::Pnt(aVertex);
-       XSpin->SetValue(aPnt.X());
-       YSpin->SetValue(aPnt.Y());
-       ZSpin->SetValue(aPnt.Z());
+        gp_Pnt aPnt = BRep_Tool::Pnt(aVertex);
+        XSpin->SetValue(aPnt.X());
+        YSpin->SetValue(aPnt.Y());
+        ZSpin->SetValue(aPnt.Z());
       }
       return;
     }
@@ -997,19 +997,19 @@ void SMESHGUI_ExtrusionAlongPathDlg::SetEditCurrentArgument (QToolButton* button
     SMESH::SetPointRepresentation(false);
     if (MeshCheck->isChecked()) {
       if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
-       aViewWindow->SetSelectionMode(ActorSelection);
+        aViewWindow->SetSelectionMode(ActorSelection);
       mySelectionMgr->installFilter(myElementsFilter);
     } else {
       if (Elements1dRB->isChecked())
-       {
-         if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
-           aViewWindow->SetSelectionMode(EdgeSelection);
-       }
+        {
+          if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+            aViewWindow->SetSelectionMode(EdgeSelection);
+        }
       else if (Elements2dRB->isChecked())
-       {
-         if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
-           aViewWindow->SetSelectionMode(FaceSelection);
-       }
+        {
+          if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+            aViewWindow->SetSelectionMode(FaceSelection);
+        }
     }
   } else if (button == SelectPathMeshButton) {
     myEditCurrentArgument = PathMeshLineEdit;
@@ -1024,10 +1024,10 @@ void SMESHGUI_ExtrusionAlongPathDlg::SetEditCurrentArgument (QToolButton* button
     if (!myPath->_is_nil()) {
       SMESH_Actor* aPathActor = SMESH::FindActorByObject(myPath);
       if (aPathActor) {
-       SMESH::SetPointRepresentation(true);
-       if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
-         aViewWindow->SetSelectionMode(NodeSelection);
-       SMESH::SetPickable(aPathActor);
+        SMESH::SetPointRepresentation(true);
+        if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+          aViewWindow->SetSelectionMode(NodeSelection);
+        SMESH::SetPickable(aPathActor);
       }
     }
   }
@@ -1172,21 +1172,21 @@ bool SMESHGUI_ExtrusionAlongPathDlg::eventFilter (QObject* object, QEvent* event
     QKeyEvent* ke = (QKeyEvent*)event;
     if (object == AnglesList) {
       if (ke->key() == Qt::Key_Delete)
-       OnAngleRemoved();
+        OnAngleRemoved();
     }
   }
   else if (event->type() == QEvent::FocusIn) {
     if (object == ElementsLineEdit) {
       if (myEditCurrentArgument != ElementsLineEdit)
-       SetEditCurrentArgument(SelectElementsButton);
+        SetEditCurrentArgument(SelectElementsButton);
     }
     else if (object == StartPointLineEdit) {
       if (myEditCurrentArgument != StartPointLineEdit)
-       SetEditCurrentArgument(SelectStartPointButton);
+        SetEditCurrentArgument(SelectStartPointButton);
     }
     else if (object == XSpin->editor() || object == YSpin->editor() || object == ZSpin->editor()) {
       if (myEditCurrentArgument != XSpin)
-       SetEditCurrentArgument(SelectBasePointButton);
+        SetEditCurrentArgument(SelectBasePointButton);
     }
   }
   return QDialog::eventFilter(object, event);
@@ -1216,8 +1216,8 @@ void SMESHGUI_ExtrusionAlongPathDlg::setFilters()
 {
   if(myMesh->_is_nil()) {
     SUIT_MessageBox::critical(this,
-                             tr("SMESH_ERROR"),
-                             tr("NO_MESH_SELECTED"));
+                              tr("SMESH_ERROR"),
+                              tr("NO_MESH_SELECTED"));
    return;
   }
   if ( !myFilterDlg )
@@ -1270,7 +1270,7 @@ void SMESHGUI_ExtrusionAlongPathDlg::updateLinearAngles()
       enableLinear = false;
       anItem->text().toDouble(&enableLinear);
       if( !enableLinear )
-       break;
+        break;
     }
   }
   if( !enableLinear )
index beb2e3f24b17c3f2e4f9a7f3dc7244f1077083ea..7c32fc1e24b9b94fd64d8344609f63923d715dd4 100644 (file)
@@ -400,24 +400,24 @@ void SMESHGUI_ExtrusionDlg::ConstructorsClicked (int constructorId)
     {
       GroupArguments->setTitle(tr("EXTRUSION_1D"));
       if (!CheckBoxMesh->isChecked())
-       {
-         LineEditElements->clear();
-         myIDs.clear();
-         if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
-           aViewWindow->SetSelectionMode(EdgeSelection);
-       }
+        {
+          LineEditElements->clear();
+          myIDs.clear();
+          if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+            aViewWindow->SetSelectionMode(EdgeSelection);
+        }
       break;
     }
   case 1:
     {
       GroupArguments->setTitle(tr("EXTRUSION_2D"));
       if (!CheckBoxMesh->isChecked())
-       {
-         LineEditElements->clear();
-         myIDs.clear();
-         if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
-           aViewWindow->SetSelectionMode(FaceSelection);
-       }
+        {
+          LineEditElements->clear();
+          myIDs.clear();
+          if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+            aViewWindow->SetSelectionMode(FaceSelection);
+        }
       break;
     }
   }
@@ -509,8 +509,8 @@ bool SMESHGUI_ExtrusionDlg::ClickOnApply()
       aParameters << SpinBox_Dz->text();
     } else if ( RadioButton4->isChecked() ) {
       gp_XYZ aNormale(SpinBox_Vx->GetValue(),
-                     SpinBox_Vy->GetValue(),
-                     SpinBox_Vz->GetValue());
+                      SpinBox_Vy->GetValue(),
+                      SpinBox_Vz->GetValue());
     
      
       aNormale /= aNormale.Modulus();
@@ -536,26 +536,26 @@ bool SMESHGUI_ExtrusionDlg::ClickOnApply()
 
       if ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() ) {
         if( CheckBoxMesh->isChecked() ) {
-         if( GetConstructorId() == 0 )
-           SMESH::ListOfGroups_var groups = 
-             aMeshEditor->ExtrusionSweepObject1DMakeGroups(mySelectedObject, aVector, aNbSteps);
-         else
-           SMESH::ListOfGroups_var groups = 
-             aMeshEditor->ExtrusionSweepObject2DMakeGroups(mySelectedObject, aVector, aNbSteps);
-       }
-       else
-         SMESH::ListOfGroups_var groups = 
-           aMeshEditor->ExtrusionSweepMakeGroups(myElementsId.inout(), aVector, aNbSteps);
+          if( GetConstructorId() == 0 )
+            SMESH::ListOfGroups_var groups = 
+              aMeshEditor->ExtrusionSweepObject1DMakeGroups(mySelectedObject, aVector, aNbSteps);
+          else
+            SMESH::ListOfGroups_var groups = 
+              aMeshEditor->ExtrusionSweepObject2DMakeGroups(mySelectedObject, aVector, aNbSteps);
+        }
+        else
+          SMESH::ListOfGroups_var groups = 
+            aMeshEditor->ExtrusionSweepMakeGroups(myElementsId.inout(), aVector, aNbSteps);
       }
       else {
-       if( CheckBoxMesh->isChecked() ) {
-         if( GetConstructorId() == 0 )
-           aMeshEditor->ExtrusionSweepObject1D(mySelectedObject, aVector, aNbSteps);
-         else
-           aMeshEditor->ExtrusionSweepObject2D(mySelectedObject, aVector, aNbSteps);
-       }
-       else
-         aMeshEditor->ExtrusionSweep(myElementsId.inout(), aVector, aNbSteps);
+        if( CheckBoxMesh->isChecked() ) {
+          if( GetConstructorId() == 0 )
+            aMeshEditor->ExtrusionSweepObject1D(mySelectedObject, aVector, aNbSteps);
+          else
+            aMeshEditor->ExtrusionSweepObject2D(mySelectedObject, aVector, aNbSteps);
+        }
+        else
+          aMeshEditor->ExtrusionSweep(myElementsId.inout(), aVector, aNbSteps);
       }
 
       myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
@@ -611,10 +611,10 @@ void SMESHGUI_ExtrusionDlg::ClickOnHelp()
     platform = "application";
 #endif
     SUIT_MessageBox::warning(this, tr("WRN_WARNING"),
-                            tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
-                            arg(app->resourceMgr()->stringValue("ExternalBrowser", 
-                                                                platform)).
-                            arg(myHelpFileName));
+                             tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                             arg(app->resourceMgr()->stringValue("ExternalBrowser", 
+                                                                 platform)).
+                             arg(myHelpFileName));
   }
 }
 
@@ -666,7 +666,7 @@ void SMESHGUI_ExtrusionDlg::onTextChange (const QString& theNewText)
       myElementsId->length( myNbOkElements = newIndices.Extent() );
       mySelector->AddOrRemoveIndex(myIO, newIndices, false);
       if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
-       aViewWindow->highlight( myIO, true, true );
+        aViewWindow->highlight( myIO, true, true );
     }
   }
 
@@ -744,7 +744,7 @@ void SMESHGUI_ExtrusionDlg::SelectionIntoArgument()
       aNbElements = aMapIndex.Extent();
 
       if (aNbElements < 1)
-       return;
+        return;
 
       myElementsId = new SMESH::long_array;
       myElementsId->length( aNbElements );
@@ -802,20 +802,20 @@ void SMESHGUI_ExtrusionDlg::SetEditCurrentArgument()
     myEditCurrentArgument = (QWidget*)LineEditElements;
     if (CheckBoxMesh->isChecked()) {
       if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
-       aViewWindow->SetSelectionMode(ActorSelection);
+        aViewWindow->SetSelectionMode(ActorSelection);
       mySelectionMgr->installFilter(myMeshOrSubMeshOrGroupFilter);
     } else {
       int aConstructorId = GetConstructorId();
       if (aConstructorId == 0)
-       {
-         if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
-           aViewWindow->SetSelectionMode(EdgeSelection);
-       }
+        {
+          if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+            aViewWindow->SetSelectionMode(EdgeSelection);
+        }
       else if (aConstructorId == 1)
-       {
-         if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
-           aViewWindow->SetSelectionMode(FaceSelection);
-       }
+        {
+          if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+            aViewWindow->SetSelectionMode(FaceSelection);
+        }
     }
   }
   else if (send == SelectVectorButton){
@@ -930,13 +930,13 @@ void SMESHGUI_ExtrusionDlg::onSelectMesh (bool toSelectMesh)
     int aConstructorId = GetConstructorId();
     if (aConstructorId == 0)
       {
-       if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
-         aViewWindow->SetSelectionMode(EdgeSelection);
+        if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+          aViewWindow->SetSelectionMode(EdgeSelection);
       }
     else if (aConstructorId == 1)
       {
-       if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
-         aViewWindow->SetSelectionMode(FaceSelection);
+        if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+          aViewWindow->SetSelectionMode(FaceSelection);
       }
 
     LineEditElements->setReadOnly(false);
@@ -983,8 +983,8 @@ void SMESHGUI_ExtrusionDlg::setFilters()
 {
   if(myMesh->_is_nil()) {
     SUIT_MessageBox::critical(this,
-                             tr("SMESH_ERROR"),
-                             tr("NO_MESH_SELECTED"));
+                              tr("SMESH_ERROR"),
+                              tr("NO_MESH_SELECTED"));
    return;
   }
   if ( !myFilterDlg )
index c6b4b699fe38ba7e4090eb5aa6b9fedb7b60d7c3..b567f89a5652d447906d3dc6f0d1215ba10855d5 100755 (executable)
@@ -210,7 +210,7 @@ bool SMESHGUI_FilterTable::AdditionalWidget::IsValid (const bool theMsg) const
     if (aWg->isEnabled() && aWg->validator()->validate(aText, p) != QValidator::Acceptable) {
       if (theMsg)
         SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_INSUFFICIENT_DATA"),
-                                    tr("SMESHGUI_INVALID_PARAMETERS"));
+                                     tr("SMESHGUI_INVALID_PARAMETERS"));
       return false;
     }
   }
@@ -423,13 +423,13 @@ public:
   ~ComboDelegate();
   
   QWidget*      createEditor( QWidget*, const QStyleOptionViewItem&,
-                             const QModelIndex& ) const;
+                              const QModelIndex& ) const;
   
   void          setEditorData( QWidget*, const QModelIndex& ) const;
   void          setModelData( QWidget*, QAbstractItemModel*, const QModelIndex& ) const;
   
   void          updateEditorGeometry( QWidget*, const QStyleOptionViewItem&, 
-                                     const QModelIndex& ) const;
+                                      const QModelIndex& ) const;
 private:
   QTableWidget* myTable;
 };
@@ -445,8 +445,8 @@ SMESHGUI_FilterTable::ComboDelegate::~ComboDelegate()
 }
 
 QWidget* SMESHGUI_FilterTable::ComboDelegate::createEditor( QWidget* parent,
-                                                           const QStyleOptionViewItem& option,
-                                                           const QModelIndex& index ) const
+                                                            const QStyleOptionViewItem& option,
+                                                            const QModelIndex& index ) const
 {
   QStringList l = index.data( Qt::UserRole ).toStringList();
   if ( !l.isEmpty() ) {
@@ -459,7 +459,7 @@ QWidget* SMESHGUI_FilterTable::ComboDelegate::createEditor( QWidget* parent,
 }
 
 void SMESHGUI_FilterTable::ComboDelegate::setEditorData( QWidget* editor, 
-                                                        const QModelIndex& index ) const
+                                                         const QModelIndex& index ) const
 {
   QString value = index.model()->data( index, Qt::DisplayRole ).toString();
   QComboBox* cb = dynamic_cast<QComboBox*>( editor );
@@ -475,8 +475,8 @@ void SMESHGUI_FilterTable::ComboDelegate::setEditorData( QWidget* editor,
 }
 
 void SMESHGUI_FilterTable::ComboDelegate::setModelData( QWidget* editor,
-                                                       QAbstractItemModel* model,
-                                                       const QModelIndex& index) const
+                                                        QAbstractItemModel* model,
+                                                        const QModelIndex& index) const
 {
   QComboBox* cb = dynamic_cast<QComboBox*>( editor );
   if ( cb ) model->setData( index, cb->currentText(), Qt::DisplayRole );
@@ -484,8 +484,8 @@ void SMESHGUI_FilterTable::ComboDelegate::setModelData( QWidget* editor,
 }
 
 void SMESHGUI_FilterTable::ComboDelegate::updateEditorGeometry( QWidget* editor,
-                                                               const QStyleOptionViewItem& option, 
-                                                               const QModelIndex& index ) const
+                                                                const QStyleOptionViewItem& option, 
+                                                                const QModelIndex& index ) const
 {
   editor->setGeometry( option.rect );
 }
@@ -597,8 +597,8 @@ bool SMESHGUI_FilterTable::Table::isEditable (int row, int col) const
 void SMESHGUI_FilterTable::Table::setReadOnly( bool on )
 {
   setEditTriggers( on ? 
-                  QAbstractItemView::NoEditTriggers  :
-                  QAbstractItemView::AllEditTriggers );
+                   QAbstractItemView::NoEditTriggers  :
+                   QAbstractItemView::AllEditTriggers );
 }
 
 bool SMESHGUI_FilterTable::Table::isReadOnly() const
@@ -1031,10 +1031,10 @@ void SMESHGUI_FilterTable::GetCriterion (const int                 theRow,
     theCriterion.Threshold = (double)((ComboItem*)aTable->item(theRow, 2))->value();
   else if ( aCriterionType != SMESH::FT_RangeOfIds &&
             aCriterionType != SMESH::FT_BelongToGeom &&
-           aCriterionType != SMESH::FT_BelongToPlane &&
-           aCriterionType != SMESH::FT_BelongToCylinder &&
-           aCriterionType != SMESH::FT_BelongToGenSurface &&
-           aCriterionType != SMESH::FT_LyingOnGeom)
+            aCriterionType != SMESH::FT_BelongToPlane &&
+            aCriterionType != SMESH::FT_BelongToCylinder &&
+            aCriterionType != SMESH::FT_BelongToGenSurface &&
+            aCriterionType != SMESH::FT_LyingOnGeom)
   {
     theCriterion.Compare = ((ComboItem*)aTable->item(theRow, 1))->value();
     theCriterion.Threshold = aTable->item(theRow, 2)->text().toDouble();
@@ -1462,9 +1462,9 @@ void SMESHGUI_FilterTable::onCriterionChanged (const int row, const int col, con
       aText.toDouble(&isOk);
       aTable->item( row, 2 )->setText(isOk ? aText : QString(""));
       if (!aTable->isEditable(row, 1))
-       aTable->setEditable(true, row, 1);
+        aTable->setEditable(true, row, 1);
       if (!aTable->isEditable(row, 2))
-       aTable->setEditable(true, row, 2);
+        aTable->setEditable(true, row, 2);
     }
   }
 
@@ -1781,7 +1781,7 @@ SMESHGUI_FilterTable::Table* SMESHGUI_FilterTable::createTable (QWidget*  thePar
   }
 
   static int aLenCr = qAbs( aMaxLenCr -
-                           aMetrics.width(tr("CRITERION"))) / aMetrics.width(' ') + 5;
+                            aMetrics.width(tr("CRITERION"))) / aMetrics.width(' ') + 5;
 
   QString aCrStr;
   aCrStr.fill(' ', aLenCr);
@@ -1811,10 +1811,10 @@ SMESHGUI_FilterTable::Table* SMESHGUI_FilterTable::createTable (QWidget*  thePar
   aTable->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));
 
   connect(aTable, SIGNAL(cellChanged(int, int)),
-         this,   SLOT(onCriterionChanged(int, int)));
+          this,   SLOT(onCriterionChanged(int, int)));
 
   connect(aTable, SIGNAL(currentCellChanged(int, int, int, int)),
-         this,   SLOT(onCurrentChanged(int, int)));
+          this,   SLOT(onCurrentChanged(int, int)));
   
   return aTable;
 }
@@ -1844,15 +1844,15 @@ void SMESHGUI_FilterTable::SetEditable (const bool isEditable)
     Table* aTable = anIter.value();
     for (int i = 0, n = aTable->rowCount(); i < n; i++)
       for (int j = 0, m = aTable->columnCount(); j < m; j++)
-       {
-         QTableWidgetItem* anItem = aTable->item(i, j);
-         if ( dynamic_cast<SMESHGUI_FilterTable::CheckItem*>( anItem ) ) {
-           Qt::ItemFlags f = anItem->flags();
-           if (!isEditable) f = f & ~Qt::ItemIsUserCheckable;
-           else f = f | Qt::ItemIsUserCheckable;
-           anItem->setFlags( f );
-         }
-       }
+        {
+          QTableWidgetItem* anItem = aTable->item(i, j);
+          if ( dynamic_cast<SMESHGUI_FilterTable::CheckItem*>( anItem ) ) {
+            Qt::ItemFlags f = anItem->flags();
+            if (!isEditable) f = f & ~Qt::ItemIsUserCheckable;
+            else f = f | Qt::ItemIsUserCheckable;
+            anItem->setFlags( f );
+          }
+        }
     //end of IPAL19974
 
     if (isEditable)
@@ -2037,8 +2037,8 @@ void SMESHGUI_FilterTable::SetID( const int      theRow,
 // Purpose : Get text and internal value from cell of ID value
 //=======================================================================
 bool SMESHGUI_FilterTable::GetID( const int      theRow,
-                                 QString&       theText,
-                                 const int      theEntityType )
+                                  QString&       theText,
+                                  const int      theEntityType )
 {
   Table* aTable = myTables[ theEntityType == -1 ? GetType() : theEntityType ];
   QTableWidgetItem* anItem = aTable->item( theRow, 5 );
@@ -2335,8 +2335,8 @@ void SMESHGUI_FilterDlg::Init (const QList<int>& theTypes)
     mySetInViewer->setChecked(true);
 
   mySourceGrp->button(myApplyToState.contains(theTypes.first()) ? 
-                     myApplyToState[ theTypes.first() ] :
-                     Selection)->setChecked(true);
+                      myApplyToState[ theTypes.first() ] :
+                      Selection)->setChecked(true);
 }
 
 //=======================================================================
@@ -2410,10 +2410,10 @@ void SMESHGUI_FilterDlg::onHelp()
     platform = "application";
 #endif
     SUIT_MessageBox::warning(this, tr("WRN_WARNING"),
-                            tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
-                            arg(app->resourceMgr()->stringValue("ExternalBrowser", 
-                                                                platform)).
-                            arg(myHelpFileName));
+                             tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                             arg(app->resourceMgr()->stringValue("ExternalBrowser", 
+                                                                 platform)).
+                             arg(myHelpFileName));
   }
 }
 
@@ -2568,7 +2568,7 @@ bool SMESHGUI_FilterDlg::isValid() const
         SMESH::GetActiveStudyDocument()->FindObjectByName(aName.toLatin1().constData(), "GEOM");
       if (aList.size() == 0) {
         SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_INSUFFICIENT_DATA"),
-                                    tr("BAD_SHAPE_NAME").arg(aName));
+                                     tr("BAD_SHAPE_NAME").arg(aName));
         return false;
       }
 
@@ -2584,26 +2584,26 @@ bool SMESHGUI_FilterDlg::isValid() const
                aFace.IsNull() ||
                aFace.ShapeType() != TopAbs_FACE) {
             SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_INSUFFICIENT_DATA"),
-                                        tr("SHAPE_IS_NOT_A_FACE").arg(aName));
+                                         tr("SHAPE_IS_NOT_A_FACE").arg(aName));
             return false;
           }
 
           Handle(Geom_Surface) aSurf = BRep_Tool::Surface(TopoDS::Face(aFace));
           if (aSurf.IsNull()) {
             SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_INSUFFICIENT_DATA"),
-                                        tr("SHAPE_IS_NOT_A_FACE").arg(aName));
+                                         tr("SHAPE_IS_NOT_A_FACE").arg(aName));
             return false;
           }
 
           if (aType == SMESH::FT_BelongToPlane && !aSurf->IsKind(STANDARD_TYPE(Geom_Plane))) {
             SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_INSUFFICIENT_DATA"),
-                                        tr("SHAPE_IS_NOT_A_PLANE").arg(aName));
+                                         tr("SHAPE_IS_NOT_A_PLANE").arg(aName));
             return false;
           }
 
           if (aType == SMESH::FT_BelongToCylinder && !aSurf->IsKind(STANDARD_TYPE(Geom_CylindricalSurface))) {
             SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_INSUFFICIENT_DATA"),
-                                        tr("SHAPE_IS_NOT_A_CYLINDER").arg(aName));
+                                         tr("SHAPE_IS_NOT_A_CYLINDER").arg(aName));
             return false;
           }
         }
index 4380d54d82122e9ea9692b591f75a693933bb5c0..e38b5b6cdb6e9f5757488a17eea9ececad87fe62 100755 (executable)
@@ -123,12 +123,12 @@ public:
                                           const int = -1 );
 
   void                      SetID( const int,
-                                  const QString&,
-                                  const int = -1 ); 
+                                   const QString&,
+                                   const int = -1 ); 
   
   bool                      GetID( const int,
-                                  QString&,
-                                  const int = -1 );
+                                   QString&,
+                                   const int = -1 );
 
   void                      Update();
 
index 47c9e912cbe88bbf68f6cbd98438b73ae2d7c450..9eb27ab6b97ed69e97b6c352677aeeb9027c4975 100644 (file)
@@ -226,7 +226,7 @@ QWidget* SMESHGUI_FilterLibraryDlg::createMainFrame (QWidget* theParent)
   connect(myOpenBtn, SIGNAL(clicked()), this, SLOT(onBrowse()));
 
   connect(myListBox, SIGNAL(itemSelectionChanged()),
-         this, SLOT(onFilterChanged()));
+          this, SLOT(onFilterChanged()));
 
   connect(myAddBtn, SIGNAL(clicked()), this, SLOT(onAddBtnPressed()));
   connect(myDeleteBtn, SIGNAL(clicked()), this, SLOT(onDeleteBtnPressed()));
@@ -423,7 +423,7 @@ bool SMESHGUI_FilterLibraryDlg::onApply()
 
   if (myLibrary->_is_nil()) {
     SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_WRN_WARNING"),
-                                tr("LIBRARY_IS_NOT_LOADED"));
+                                 tr("LIBRARY_IS_NOT_LOADED"));
     return false;
   }
 
@@ -437,11 +437,11 @@ bool SMESHGUI_FilterLibraryDlg::onApply()
   } else if (myMode == EDIT || myMode == ADD_TO) {
     SMESH::Filter_var aFilter = createFilter();
     if (!myListBox->selectedItems().empty() && 
-       !myLibrary->Replace(myCurrFilterName.toLatin1().constData(),
-                           myName->text().toLatin1().constData(),
-                           aFilter.in())) {
+        !myLibrary->Replace(myCurrFilterName.toLatin1().constData(),
+                            myName->text().toLatin1().constData(),
+                            aFilter.in())) {
       SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_ERROR"),
-                                  tr("ERROR_OF_EDITING"));
+                                   tr("ERROR_OF_EDITING"));
       aResult = false;
     }
     else
@@ -457,7 +457,7 @@ bool SMESHGUI_FilterLibraryDlg::onApply()
     delete aFileName;
   } else if (myMode != COPY_FROM) {
     SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_ERROR"),
-                                tr("ERROR_OF_SAVING"));
+                                 tr("ERROR_OF_SAVING"));
   } else {
   }
 
@@ -507,10 +507,10 @@ void SMESHGUI_FilterLibraryDlg::onHelp()
     platform = "application";
 #endif
     SUIT_MessageBox::warning(this, tr("WRN_WARNING"),
-                            tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
-                            arg(app->resourceMgr()->stringValue("ExternalBrowser", 
-                                                                platform)).
-                            arg(myHelpFileName));
+                             tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                             arg(app->resourceMgr()->stringValue("ExternalBrowser", 
+                                                                 platform)).
+                             arg(myHelpFileName));
   }
 }
 
@@ -674,7 +674,7 @@ void SMESHGUI_FilterLibraryDlg::processNewLibrary()
   if (myLibrary->_is_nil()) {
     if (myMode == COPY_FROM) {
       SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_ERROR"),
-                                  tr("ERROR_LOAD"));
+                                   tr("ERROR_LOAD"));
       return;
     } else {
       myLibrary = aFilterMgr->CreateLibrary();
@@ -730,7 +730,7 @@ bool SMESHGUI_FilterLibraryDlg::isNameValid(const bool theMess) const
     if (aCurrName.isEmpty()) {
       if (theMess)
         SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_INSUFFICIENT_DATA"),
-                                    tr("EMPTY_FILTER_NAME"));
+                                     tr("EMPTY_FILTER_NAME"));
       return false;
     }
 
@@ -739,7 +739,7 @@ bool SMESHGUI_FilterLibraryDlg::isNameValid(const bool theMess) const
       if (aNames[ f ] == aCurrName && aNames[ f ] != myCurrFilterName) {
         if (theMess)
           SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_INSUFFICIENT_DATA"),
-                                      tr("ERROR_FILTER_NAME"));
+                                       tr("ERROR_FILTER_NAME"));
         return false;
       }
     }
@@ -787,7 +787,7 @@ bool SMESHGUI_FilterLibraryDlg::isPermissionValid(const bool theIsExistingOnly)
 
   if (!isWritable) {
     SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_WRN_WARNING"),
-                                tr("NO_PERMISSION"));
+                                 tr("NO_PERMISSION"));
     return false;
   }
 
@@ -831,8 +831,8 @@ void SMESHGUI_FilterLibraryDlg::onFilterChanged()
 
     SMESH::Filter_var aFilter = createFilter();
     myLibrary->Replace(myCurrFilterName.toLatin1().constData(), 
-                      myName->text().toLatin1().constData(), 
-                      aFilter);
+                       myName->text().toLatin1().constData(), 
+                       aFilter);
   }
 
   // Fill table with filter parameters
@@ -938,8 +938,8 @@ void SMESHGUI_FilterLibraryDlg::onAddBtnPressed()
 
     SMESH::Filter_var aFilter = createFilter();
     myLibrary->Replace(myCurrFilterName.toLatin1().constData(), 
-                      myName->text().toLatin1().constData(), 
-                      aFilter);
+                       myName->text().toLatin1().constData(), 
+                       aFilter);
   }
   myTable->Clear(myTable->GetType());
 
@@ -955,7 +955,7 @@ void SMESHGUI_FilterLibraryDlg::addFilterToLib (const QString& theName)
 {
   if (myLibrary->_is_nil()) {
     SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_WRN_WARNING"),
-                                tr("LIBRARY_IS_NOT_LOADED"));
+                                 tr("LIBRARY_IS_NOT_LOADED"));
     return;
   }
 
@@ -979,7 +979,7 @@ void SMESHGUI_FilterLibraryDlg::addFilterToLib (const QString& theName)
 
   if (!aResult) {
     SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_ERROR"),
-                                tr("ERROR_OF_ADDING"));
+                                 tr("ERROR_OF_ADDING"));
   }
 
   updateList();
@@ -989,7 +989,7 @@ void SMESHGUI_FilterLibraryDlg::addFilterToLib (const QString& theName)
 
   if (theName != aName)
     SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_WARNING"),
-                                tr("ASSIGN_NEW_NAME").arg(theName).arg(aName));
+                                 tr("ASSIGN_NEW_NAME").arg(theName).arg(aName));
 }
 
 //=======================================================================
@@ -1089,7 +1089,7 @@ void SMESHGUI_FilterLibraryDlg::onDeleteBtnPressed()
 {
   if (myLibrary->_is_nil()) {
     SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_WRN_WARNING"),
-                                tr("LIBRARY_IS_NOT_LOADED"));
+                                 tr("LIBRARY_IS_NOT_LOADED"));
     return;
   }
 
@@ -1097,7 +1097,7 @@ void SMESHGUI_FilterLibraryDlg::onDeleteBtnPressed()
 
   if (anIndex == -1 || !myLibrary->Delete(myCurrFilterName.toLatin1().constData())) {
     SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_ERROR"),
-                                tr("ERROR_OF_DELETING"));
+                                 tr("ERROR_OF_DELETING"));
   } else {
     myCurrFilterName = "";
     myCurrFilter = -1;
@@ -1188,8 +1188,8 @@ void SMESHGUI_FilterLibraryDlg::onNeedValidation()
     {
       SMESH::Filter_var aFilter = createFilter(myTable->GetType());
       myLibrary->Replace(myCurrFilterName.toLatin1().constData(),
-                        myName->text().toLatin1().constData(),
-                        aFilter);
+                         myName->text().toLatin1().constData(),
+                         aFilter);
     }
   }
 }
index 33907aec03508e625ab08fd38c670a12efbffe8f..d3544b4d24cb56ad1c76013b89bc6ffeace2c925 100644 (file)
@@ -64,7 +64,7 @@ namespace SMESH
         SMESH::SMESH_subMesh_var aSubmesh =
           SObjectToInterface<SMESH::SMESH_subMesh>( theMeshOrSubmesh );
         if ( !aSubmesh->_is_nil() )
-         return aSubmesh->GetSubShape();
+          return aSubmesh->GetSubShape();
       }
     }
     return GEOM::GEOM_Object::_nil();
@@ -89,7 +89,7 @@ namespace SMESH
         SALOMEDS_SObject* aRefSO = _CAST(SObject,aRefSOClient);
         aMeshShape = GEOM::GEOM_Object::_narrow(aRefSO->GetObject());
       } else {
-       SALOMEDS_SObject* aSO = _CAST(SObject,aSObject);
+        SALOMEDS_SObject* aSO = _CAST(SObject,aSObject);
         aMeshShape = GEOM::GEOM_Object::_narrow(aSO->GetObject());
       }
 
index 80e98c0cfe2474c18f935542bdd590c637c2f03e..ddbfbc4ff6332677c5ec5993a49988f175ce90e7 100644 (file)
 // purpose  :
 //=================================================================================
 SMESHGUI_GroupDlg::SMESHGUI_GroupDlg( SMESHGUI* theModule,
-                                     SMESH::SMESH_Mesh_ptr theMesh )
+                                      SMESH::SMESH_Mesh_ptr theMesh )
   : QDialog( SMESH::GetDesktop( theModule ) ),
     mySMESHGUI( theModule ),
     mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
@@ -129,7 +129,7 @@ SMESHGUI_GroupDlg::SMESHGUI_GroupDlg( SMESHGUI* theModule,
 // purpose  :
 //=================================================================================
 SMESHGUI_GroupDlg::SMESHGUI_GroupDlg( SMESHGUI* theModule,
-                                     SMESH::SMESH_GroupBase_ptr theGroup,
+                                      SMESH::SMESH_GroupBase_ptr theGroup,
                                       const bool theIsConvert )
   : QDialog( SMESH::GetDesktop( theModule ) ),
     mySMESHGUI( theModule ),
@@ -330,7 +330,7 @@ void SMESHGUI_GroupDlg::initDialog( bool create)
   QLabel* aColorLab = new QLabel(tr( "SMESH_CHECK_COLOR" ), aColorBox );
   myColorBtn = new QtxColorButton(aColorBox);
   myColorBtn->setSizePolicy( QSizePolicy::MinimumExpanding, 
-                            myColorBtn->sizePolicy().verticalPolicy() );
+                             myColorBtn->sizePolicy().verticalPolicy() );
 
   aColorBoxLayout->addWidget(aColorLab);
   aColorBoxLayout->addWidget(myColorBtn);
@@ -693,36 +693,36 @@ void SMESHGUI_GroupDlg::setSelectionMode (int theMode)
       switch (theMode) {
       case 0:
         if (myActor)
-         myActor->SetPointRepresentation(true);
-       else
-         SMESH::SetPointRepresentation(true);
-       if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
-         aViewWindow->SetSelectionMode(NodeSelection);
-       break;
+          myActor->SetPointRepresentation(true);
+        else
+          SMESH::SetPointRepresentation(true);
+        if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+          aViewWindow->SetSelectionMode(NodeSelection);
+        break;
       case 1:
-       if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
-         aViewWindow->SetSelectionMode(EdgeSelection);
-       break;
+        if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+          aViewWindow->SetSelectionMode(EdgeSelection);
+        break;
       case 2:
-       if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
-         aViewWindow->SetSelectionMode(FaceSelection);
-       break;
+        if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+          aViewWindow->SetSelectionMode(FaceSelection);
+        break;
       default:
-       if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
-         aViewWindow->SetSelectionMode(VolumeSelection);
+        if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+          aViewWindow->SetSelectionMode(VolumeSelection);
       }
     } else {
       if (theMode == 4)
-       mySelectionMgr->installFilter(mySubMeshFilter);
+        mySelectionMgr->installFilter(mySubMeshFilter);
       else if (theMode == 5)
-       mySelectionMgr->installFilter(myGroupFilter);
+        mySelectionMgr->installFilter(myGroupFilter);
       else if (theMode == 6)
-       mySelectionMgr->installFilter(myMeshFilter);
+        mySelectionMgr->installFilter(myMeshFilter);
       else if (theMode == 7)
-       mySelectionMgr->installFilter(myGeomFilter);
+        mySelectionMgr->installFilter(myGeomFilter);
 
       if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
-       aViewWindow->SetSelectionMode(ActorSelection);
+        aViewWindow->SetSelectionMode(ActorSelection);
     }
     mySelectionMode = theMode;
   }
@@ -752,7 +752,7 @@ bool SMESHGUI_GroupDlg::onApply()
         if (myMesh->_is_nil())
           return false;
         myGroup = myMesh->ConvertToStandalone( myGroupOnGeom );
-       // nullify pointer, because object become dead
+        // nullify pointer, because object become dead
         myGroupOnGeom = SMESH::SMESH_GroupOnGeom::_nil();
       }
     }
@@ -773,7 +773,7 @@ bool SMESHGUI_GroupDlg::onApply()
       int i, k = myElements->count();
       anIdList->length(k);
       for (i = 0; i < k; i++) {
-       anIdList[i] = myElements->item(i)->text().toInt();
+        anIdList[i] = myElements->item(i)->text().toInt();
       }
 
       myGroup = SMESH::AddGroup(myMesh, aType, myName->text());
@@ -800,46 +800,46 @@ bool SMESHGUI_GroupDlg::onApply()
 
       _PTR(SObject) aMeshGroupSO = SMESH::FindSObject(myGroup);
       if(SMESH_Actor *anActor = SMESH::FindActorByEntry(aMeshGroupSO->GetID().c_str())) {
-       anActor->setName(myName->text().toLatin1().data());
-       switch ( myTypeId ) {
-       case 0: anActor->SetNodeColor( aColor.R, aColor.G, aColor.B ); break;
-       case 1: anActor->SetEdgeColor( aColor.R, aColor.G, aColor.B ); break;
-       case 2:
-       case 3: anActor->SetSufaceColor( aColor.R, aColor.G, aColor.B ); break;
-       }
+        anActor->setName(myName->text().toLatin1().data());
+        switch ( myTypeId ) {
+        case 0: anActor->SetNodeColor( aColor.R, aColor.G, aColor.B ); break;
+        case 1: anActor->SetEdgeColor( aColor.R, aColor.G, aColor.B ); break;
+        case 2:
+        case 3: anActor->SetSufaceColor( aColor.R, aColor.G, aColor.B ); break;
+        }
       }
 
       QList<int> aAddList;
 
       int i, total = myElements->count();
       for (i = 0; i < total; i++) {
-       int anId = myElements->item(i)->text().toInt();
-       int idx = myIdList.indexOf(anId);
-       if ( idx == -1 )
-         aAddList.append(anId);
-       else
-         myIdList.removeAt(idx);
+        int anId = myElements->item(i)->text().toInt();
+        int idx = myIdList.indexOf(anId);
+        if ( idx == -1 )
+          aAddList.append(anId);
+        else
+          myIdList.removeAt(idx);
       }
       if (!aAddList.empty()) {
-       SMESH::long_array_var anIdList = new SMESH::long_array;
-       int added = aAddList.count();
-       anIdList->length(added);
-       for (i = 0; i < added; i++)
-         anIdList[i] = aAddList[i];
-       myGroup->Add(anIdList.inout());
+        SMESH::long_array_var anIdList = new SMESH::long_array;
+        int added = aAddList.count();
+        anIdList->length(added);
+        for (i = 0; i < added; i++)
+          anIdList[i] = aAddList[i];
+        myGroup->Add(anIdList.inout());
       }
       if (!myIdList.empty()) {
-       SMESH::long_array_var anIdList = new SMESH::long_array;
-       int removed = myIdList.count();
-       anIdList->length(removed);
-       for (i = 0; i < removed; i++)
-         anIdList[i] = myIdList[i];
-       myGroup->Remove(anIdList.inout());
+        SMESH::long_array_var anIdList = new SMESH::long_array;
+        int removed = myIdList.count();
+        anIdList->length(removed);
+        for (i = 0; i < removed; i++)
+          anIdList[i] = myIdList[i];
+        myGroup->Remove(anIdList.inout());
       }
       /* init for next operation */
       myIdList.clear();
       for (i = 0; i < total; i++) {
-       myIdList.append(myElements->item(i)->text().toInt());
+        myIdList.append(myElements->item(i)->text().toInt());
       }
     }
 
@@ -863,12 +863,12 @@ bool SMESHGUI_GroupDlg::onApply()
 
       _PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
       GEOM::GEOM_IGroupOperations_var aGroupOp =
-       SMESH::GetGEOMGen()->GetIGroupOperations(aStudy->StudyId());
+        SMESH::GetGEOMGen()->GetIGroupOperations(aStudy->StudyId());
 
       if (myGeomObjects->length() == 1) {
-       myGroupOnGeom = myMesh->CreateGroupFromGEOM(aType,
-                                                   myName->text().toLatin1().data(),
-                                                   myGeomObjects[0]);
+        myGroupOnGeom = myMesh->CreateGroupFromGEOM(aType,
+                                                    myName->text().toLatin1().data(),
+                                                    myGeomObjects[0]);
       }
       else {
         SMESH::SMESH_Gen_var aSMESHGen = SMESHGUI::GetSMESHGen();
@@ -910,12 +910,12 @@ bool SMESHGUI_GroupDlg::onApply()
           aNewGeomGroupName += myName->text();
           SALOMEDS::SObject_var aNewGroupSO =
             geomGen->AddInStudy(aSMESHGen->GetCurrentStudy(), aGroupVar,
-                               aNewGeomGroupName.toLatin1().data(), aMeshShape);
+                                aNewGeomGroupName.toLatin1().data(), aMeshShape);
         }
 
         myGroupOnGeom = myMesh->CreateGroupFromGEOM(aType,
-                                                   myName->text().toLatin1().data(),
-                                                   aGroupVar);
+                                                    myName->text().toLatin1().data(),
+                                                    aGroupVar);
       }
 
       SALOMEDS::Color aColor = getGroupColor();
@@ -938,13 +938,13 @@ bool SMESHGUI_GroupDlg::onApply()
 
       _PTR(SObject) aMeshGroupSO = SMESH::FindSObject(myGroupOnGeom);
       if(SMESH_Actor *anActor = SMESH::FindActorByEntry(aMeshGroupSO->GetID().c_str())) {
-       anActor->setName(myName->text().toLatin1().data());
-       switch ( myTypeId ) {
-       case 0: anActor->SetNodeColor( aColor.R, aColor.G, aColor.B ); break;
-       case 1: anActor->SetEdgeColor( aColor.R, aColor.G, aColor.B ); break;
-       case 2:
-       case 3: anActor->SetSufaceColor( aColor.R, aColor.G, aColor.B ); break;
-       }
+        anActor->setName(myName->text().toLatin1().data());
+        switch ( myTypeId ) {
+        case 0: anActor->SetNodeColor( aColor.R, aColor.G, aColor.B ); break;
+        case 1: anActor->SetEdgeColor( aColor.R, aColor.G, aColor.B ); break;
+        case 2:
+        case 3: anActor->SetSufaceColor( aColor.R, aColor.G, aColor.B ); break;
+        }
       }
     }
 
@@ -1026,7 +1026,7 @@ void SMESHGUI_GroupDlg::onObjectSelectionChanged()
       myGeomObjects->length(0);
 
       if (myGeomGroupBtn->isChecked())
-       myGeomGroupBtn->setChecked(false);
+        myGeomGroupBtn->setChecked(false);
       if (!myCreate)
         myName->setText( "" );
 
@@ -1045,16 +1045,16 @@ void SMESHGUI_GroupDlg::onObjectSelectionChanged()
       Handle(SALOME_InteractiveObject) IO = aList.First();
 
       if (myCreate) {
-       restoreShowEntityMode();
-       myMesh = SMESH::IObjectToInterface<SMESH::SMESH_Mesh>(IO);
+        restoreShowEntityMode();
+        myMesh = SMESH::IObjectToInterface<SMESH::SMESH_Mesh>(IO);
         setShowEntityMode();
         updateGeomPopup();
         if (myMesh->_is_nil())
-       {
+        {
           updateButtons();
-         myIsBusy = false;
-         return;
-       }
+          myIsBusy = false;
+          return;
+        }
         myGroup = SMESH::SMESH_Group::_nil();
 
         // NPAL19389: create a group with a selection in another group
@@ -1075,15 +1075,15 @@ void SMESHGUI_GroupDlg::onObjectSelectionChanged()
       else {
         SMESH::SMESH_GroupBase_var aGroup = SMESH::IObjectToInterface<SMESH::SMESH_GroupBase>(IO);
         if (aGroup->_is_nil())
-       {
-         myIsBusy = false;
+        {
+          myIsBusy = false;
           return;
-       }
+        }
         myIsBusy = false;
         myCurrentLineEdit = 0;
 
-       myGroup = SMESH::SMESH_Group::_nil();
-       myGroupOnGeom = SMESH::SMESH_GroupOnGeom::_nil();
+        myGroup = SMESH::SMESH_Group::_nil();
+        myGroupOnGeom = SMESH::SMESH_GroupOnGeom::_nil();
 
         init(aGroup);
         myIsBusy = true;
@@ -1097,13 +1097,13 @@ void SMESHGUI_GroupDlg::onObjectSelectionChanged()
 
       if (myGrpTypeId == 0)
       {
-       if (myTypeId == -1)
-         onTypeChanged(0);
-       else
-       {
-         myElements->clear();
-         setSelectionMode(myTypeId);
-       }
+        if (myTypeId == -1)
+          onTypeChanged(0);
+        else
+        {
+          myElements->clear();
+          setSelectionMode(myTypeId);
+        }
       }
 
       myIsBusy = false;
@@ -1119,10 +1119,10 @@ void SMESHGUI_GroupDlg::onObjectSelectionChanged()
 
       if (aNbSel == 0 || !aMeshSO)
       {
-       myGeomObjects->length(0);
-       updateButtons();
-       myIsBusy = false;
-       return;
+        myGeomObjects->length(0);
+        updateButtons();
+        myIsBusy = false;
+        return;
       }
 
       myGeomObjects->length(aNbSel);
@@ -1181,10 +1181,10 @@ void SMESHGUI_GroupDlg::onObjectSelectionChanged()
 
       myGeomObjects->length(i);
       if ( i == 0 )
-       {
-         myIsBusy = false;
-         return;
-       }
+        {
+          myIsBusy = false;
+          return;
+        }
 
       aNbSel = i;
     }
@@ -1258,26 +1258,26 @@ void SMESHGUI_GroupDlg::onObjectSelectionChanged()
       QString aListStr = "";
       int aNbItems = 0;
       if (myTypeId == 0) {
-       aNbItems = SMESH::GetNameOfSelectedNodes(mySelector, myActor->getIO(), aListStr);
+        aNbItems = SMESH::GetNameOfSelectedNodes(mySelector, myActor->getIO(), aListStr);
       } else {
-       aNbItems = SMESH::GetNameOfSelectedElements(mySelector, myActor->getIO(), aListStr);
+        aNbItems = SMESH::GetNameOfSelectedElements(mySelector, myActor->getIO(), aListStr);
       }
       if (aNbItems > 0) {
-       QListWidgetItem* anItem;
-       QList<QListWidgetItem*> listItemsToSel;
-       QStringList anElements = aListStr.split( " ", QString::SkipEmptyParts);
-       for (QStringList::iterator it = anElements.begin(); it != anElements.end(); ++it) {
-         QList<QListWidgetItem*> found = myElements->findItems(*it, Qt::MatchExactly);
-         foreach(anItem, found)
-           if (!anItem->isSelected())
-             listItemsToSel.push_back(anItem);
-       }
-       bool blocked = myElements->signalsBlocked();
-       myElements->blockSignals(true);
-       foreach(anItem, listItemsToSel) anItem->setSelected(true);
-       myElements->blockSignals(blocked);
-       onListSelectionChanged();
-       listItemsToSel.clear();
+        QListWidgetItem* anItem;
+        QList<QListWidgetItem*> listItemsToSel;
+        QStringList anElements = aListStr.split( " ", QString::SkipEmptyParts);
+        for (QStringList::iterator it = anElements.begin(); it != anElements.end(); ++it) {
+          QList<QListWidgetItem*> found = myElements->findItems(*it, Qt::MatchExactly);
+          foreach(anItem, found)
+            if (!anItem->isSelected())
+              listItemsToSel.push_back(anItem);
+        }
+        bool blocked = myElements->signalsBlocked();
+        myElements->blockSignals(true);
+        foreach(anItem, listItemsToSel) anItem->setSelected(true);
+        myElements->blockSignals(blocked);
+        onListSelectionChanged();
+        listItemsToSel.clear();
       }
     }
   }
@@ -1413,8 +1413,8 @@ void SMESHGUI_GroupDlg::setFilters()
 {
   if(myMesh->_is_nil()) {
     SUIT_MessageBox::critical(this,
-                             tr("SMESH_ERROR"),
-                             tr("NO_MESH_SELECTED"));
+                              tr("SMESH_ERROR"),
+                              tr("NO_MESH_SELECTED"));
    return;
   }
 
@@ -1511,18 +1511,18 @@ void SMESHGUI_GroupDlg::onAdd()
     if (aNbItems > 0) {
       QStringList anElements = aListStr.split( " ", QString::SkipEmptyParts);
       for (QStringList::iterator it = anElements.begin(); it != anElements.end(); ++it) {
-       QList<QListWidgetItem*> found = myElements->findItems(*it, Qt::MatchExactly);
-       if (found.count() == 0) {
-         anItem = new QListWidgetItem(*it);
-         myElements->addItem(anItem);
-         if (!anItem->isSelected())
-           listItemsToSel.push_back(anItem);
-       }
-       else {
-         foreach(anItem, found)
-           if (!anItem->isSelected())
-             listItemsToSel.push_back(anItem);
-       }
+        QList<QListWidgetItem*> found = myElements->findItems(*it, Qt::MatchExactly);
+        if (found.count() == 0) {
+          anItem = new QListWidgetItem(*it);
+          myElements->addItem(anItem);
+          if (!anItem->isSelected())
+            listItemsToSel.push_back(anItem);
+        }
+        else {
+          foreach(anItem, found)
+            if (!anItem->isSelected())
+              listItemsToSel.push_back(anItem);
+        }
       }
       bool blocked = myElements->signalsBlocked();
       myElements->blockSignals(true);
@@ -1542,8 +1542,8 @@ void SMESHGUI_GroupDlg::onAdd()
       SMESH::SMESH_subMesh_var aSubMesh =
         SMESH::IObjectToInterface<SMESH::SMESH_subMesh>(anIt.Value());
       if (!aSubMesh->_is_nil()) {
-       // check if mesh is the same
-       if (aSubMesh->GetFather()->GetId() == myMesh->GetId()) {
+        // check if mesh is the same
+        if (aSubMesh->GetFather()->GetId() == myMesh->GetId()) {
           try {
             SMESH::long_array_var anElements = aSubMesh->GetElementsByType(aType);
             int k = anElements->length();
@@ -1553,21 +1553,21 @@ void SMESHGUI_GroupDlg::onAdd()
               if (found.count() == 0) {
                 anItem = new QListWidgetItem(aText);
                 myElements->addItem(anItem);
-               if (!anItem->isSelected())
-                 listItemsToSel.push_back(anItem);
+                if (!anItem->isSelected())
+                  listItemsToSel.push_back(anItem);
+              }
+              else {
+                foreach(anItem, found)
+                  if (!anItem->isSelected())
+                    listItemsToSel.push_back(anItem);
               }
-             else {
-               foreach(anItem, found)
-                 if (!anItem->isSelected())
-                   listItemsToSel.push_back(anItem);
-             }
             }
-           bool blocked = myElements->signalsBlocked();
-           myElements->blockSignals(true);
-           foreach(anItem, listItemsToSel) anItem->setSelected(true);
-           myElements->blockSignals(blocked);
-           onListSelectionChanged();
-           listItemsToSel.clear();
+            bool blocked = myElements->signalsBlocked();
+            myElements->blockSignals(true);
+            foreach(anItem, listItemsToSel) anItem->setSelected(true);
+            myElements->blockSignals(blocked);
+            onListSelectionChanged();
+            listItemsToSel.clear();
           }
           catch (const SALOME::SALOME_Exception& ex) {
             SalomeApp_Tools::QtCatchCorbaException(ex);
@@ -1589,32 +1589,32 @@ void SMESHGUI_GroupDlg::onAdd()
       SMESH::SMESH_GroupBase_var aGroup =
         SMESH::IObjectToInterface<SMESH::SMESH_GroupBase>(anIt.Value());
       if (!aGroup->_is_nil()) {
-       // check if mesh is the same
-       if (aGroup->GetType() == aType && aGroup->GetMesh()->GetId() == myMesh->GetId()) {
-         SMESH::long_array_var anElements = aGroup->GetListOfID();
-         int k = anElements->length();
-         for (int i = 0; i < k; i++) {
-           QString aText = QString::number(anElements[i]);
-           QList<QListWidgetItem*> found = myElements->findItems(aText, Qt::MatchExactly);
-           if (found.count() == 0) {
-             anItem = new QListWidgetItem(aText);
-             myElements->addItem(anItem);
-             if (!anItem->isSelected())
-               listItemsToSel.push_back(anItem);
-           }
-           else {
-             foreach(anItem, found)
-               if (!anItem->isSelected())
-                 listItemsToSel.push_back(anItem);
-           }
-         }
-         bool blocked = myElements->signalsBlocked();
-         myElements->blockSignals(true);
-         foreach(anItem, listItemsToSel) anItem->setSelected(true);
-         myElements->blockSignals(blocked);
-         onListSelectionChanged();
-         listItemsToSel.clear();
-       }
+        // check if mesh is the same
+        if (aGroup->GetType() == aType && aGroup->GetMesh()->GetId() == myMesh->GetId()) {
+          SMESH::long_array_var anElements = aGroup->GetListOfID();
+          int k = anElements->length();
+          for (int i = 0; i < k; i++) {
+            QString aText = QString::number(anElements[i]);
+            QList<QListWidgetItem*> found = myElements->findItems(aText, Qt::MatchExactly);
+            if (found.count() == 0) {
+              anItem = new QListWidgetItem(aText);
+              myElements->addItem(anItem);
+              if (!anItem->isSelected())
+                listItemsToSel.push_back(anItem);
+            }
+            else {
+              foreach(anItem, found)
+                if (!anItem->isSelected())
+                  listItemsToSel.push_back(anItem);
+            }
+          }
+          bool blocked = myElements->signalsBlocked();
+          myElements->blockSignals(true);
+          foreach(anItem, listItemsToSel) anItem->setSelected(true);
+          myElements->blockSignals(blocked);
+          onListSelectionChanged();
+          listItemsToSel.clear();
+        }
       }
     }
     mySelectGroup->setChecked(false);
@@ -1652,19 +1652,19 @@ void SMESHGUI_GroupDlg::onAdd()
 
       int k = anElements->length();
       for (int i = 0; i < k; i++) {
-       QString aText = QString::number(anElements[i]);
-       QList<QListWidgetItem*> found = myElements->findItems(aText, Qt::MatchExactly);
-       if (found.count() == 0) {
-         anItem = new QListWidgetItem(aText);
-         myElements->addItem(anItem);
-         if (!anItem->isSelected())
-           listItemsToSel.push_back(anItem);
-       }
-       else {
-         foreach(anItem, found)
-           if (!anItem->isSelected())
-             listItemsToSel.push_back(anItem);
-       }
+        QString aText = QString::number(anElements[i]);
+        QList<QListWidgetItem*> found = myElements->findItems(aText, Qt::MatchExactly);
+        if (found.count() == 0) {
+          anItem = new QListWidgetItem(aText);
+          myElements->addItem(anItem);
+          if (!anItem->isSelected())
+            listItemsToSel.push_back(anItem);
+        }
+        else {
+          foreach(anItem, found)
+            if (!anItem->isSelected())
+              listItemsToSel.push_back(anItem);
+        }
       }
       bool blocked = myElements->signalsBlocked();
       myElements->blockSignals(true);
@@ -1717,42 +1717,42 @@ void SMESHGUI_GroupDlg::onRemove()
 
       SALOME_ListIteratorOfListIO anIt (aList);
       for ( ; anIt.More(); anIt.Next()) {
-       SMESH::SMESH_subMesh_var aSubMesh = SMESH::IObjectToInterface<SMESH::SMESH_subMesh>(anIt.Value());
-       if (!aSubMesh->_is_nil()) {
-         // check if mesh is the same
-         if (aSubMesh->GetFather()->GetId() == myMesh->GetId()) {
-           if (aType == SMESH::NODE) {
-             try {
-               SMESH::long_array_var anElements = aSubMesh->GetNodesId();
-               int k = anElements->length();
-               for (int i = 0; i < k; i++) {
-                 QList<QListWidgetItem*> found = 
-                   myElements->findItems(QString::number(anElements[i]), Qt::MatchExactly);
-                 QListWidgetItem* anItem;
-                 foreach(anItem, found) delete anItem;
-               }
-             }
-             catch (const SALOME::SALOME_Exception& ex) {
-               SalomeApp_Tools::QtCatchCorbaException(ex);
-             }
-           }
-           else {
-             try {
-               SMESH::long_array_var anElements = aSubMesh->GetElementsId();
-               int k = anElements->length();
-               for (int i = 0; i < k; i++) {
-                 QList<QListWidgetItem*> found = 
-                   myElements->findItems(QString::number(anElements[i]), Qt::MatchExactly);
-                 QListWidgetItem* anItem;
-                 foreach(anItem, found) delete anItem;
-               }
-             }
-             catch (const SALOME::SALOME_Exception& ex) {
-               SalomeApp_Tools::QtCatchCorbaException(ex);
-             }
-           }
-         }
-       }
+        SMESH::SMESH_subMesh_var aSubMesh = SMESH::IObjectToInterface<SMESH::SMESH_subMesh>(anIt.Value());
+        if (!aSubMesh->_is_nil()) {
+          // check if mesh is the same
+          if (aSubMesh->GetFather()->GetId() == myMesh->GetId()) {
+            if (aType == SMESH::NODE) {
+              try {
+                SMESH::long_array_var anElements = aSubMesh->GetNodesId();
+                int k = anElements->length();
+                for (int i = 0; i < k; i++) {
+                  QList<QListWidgetItem*> found = 
+                    myElements->findItems(QString::number(anElements[i]), Qt::MatchExactly);
+                  QListWidgetItem* anItem;
+                  foreach(anItem, found) delete anItem;
+                }
+              }
+              catch (const SALOME::SALOME_Exception& ex) {
+                SalomeApp_Tools::QtCatchCorbaException(ex);
+              }
+            }
+            else {
+              try {
+                SMESH::long_array_var anElements = aSubMesh->GetElementsId();
+                int k = anElements->length();
+                for (int i = 0; i < k; i++) {
+                  QList<QListWidgetItem*> found = 
+                    myElements->findItems(QString::number(anElements[i]), Qt::MatchExactly);
+                  QListWidgetItem* anItem;
+                  foreach(anItem, found) delete anItem;
+                }
+              }
+              catch (const SALOME::SALOME_Exception& ex) {
+                SalomeApp_Tools::QtCatchCorbaException(ex);
+              }
+            }
+          }
+        }
       }
     }
     else if (myCurrentLineEdit == myGroupLine) {
@@ -1763,20 +1763,20 @@ void SMESHGUI_GroupDlg::onRemove()
 
       SALOME_ListIteratorOfListIO anIt (aList);
       for ( ; anIt.More(); anIt.Next()) {
-       SMESH::SMESH_Group_var aGroup = SMESH::IObjectToInterface<SMESH::SMESH_Group>(anIt.Value());
-       if (aRes && !aGroup->_is_nil()) {
-         // check if mesh is the same
-         if (aGroup->GetType() == aType && aGroup->GetMesh()->GetId() == myMesh->GetId()) {
-           SMESH::long_array_var anElements = aGroup->GetListOfID();
-           int k = anElements->length();
-           for (int i = 0; i < k; i++) {
-             QList<QListWidgetItem*> found = 
-               myElements->findItems(QString::number(anElements[i]), Qt::MatchExactly);
-             QListWidgetItem* anItem;
-             foreach(anItem, found) delete anItem;
-           }
-         }
-       }
+        SMESH::SMESH_Group_var aGroup = SMESH::IObjectToInterface<SMESH::SMESH_Group>(anIt.Value());
+        if (aRes && !aGroup->_is_nil()) {
+          // check if mesh is the same
+          if (aGroup->GetType() == aType && aGroup->GetMesh()->GetId() == myMesh->GetId()) {
+            SMESH::long_array_var anElements = aGroup->GetListOfID();
+            int k = anElements->length();
+            for (int i = 0; i < k; i++) {
+              QList<QListWidgetItem*> found = 
+                myElements->findItems(QString::number(anElements[i]), Qt::MatchExactly);
+              QListWidgetItem* anItem;
+              foreach(anItem, found) delete anItem;
+            }
+          }
+        }
       }
     }
   }
@@ -1804,7 +1804,7 @@ void SMESHGUI_GroupDlg::onSort()
       int id = myElements->item(i)->text().toInt();
       anArray[i] = id;
       if (myElements->item(i)->isSelected())
-       aSelected.append(id);
+        aSelected.append(id);
     }
     // sort & update list
     std::sort(anArray.begin(), anArray.end());
@@ -1816,7 +1816,7 @@ void SMESHGUI_GroupDlg::onSort()
       anItem = new QListWidgetItem(QString::number(anArray[i]));
       myElements->addItem(anItem);
       if (aSelected.contains(anArray[i]))
-       listItemsToSel.push_back(anItem);
+        listItemsToSel.push_back(anItem);
     }
     bool blocked = myElements->signalsBlocked();
     myElements->blockSignals(true);
@@ -1875,10 +1875,10 @@ void SMESHGUI_GroupDlg::onHelp()
     platform = "application";
 #endif
     SUIT_MessageBox::warning(this, tr( "WRN_WARNING" ),
-                            tr( "EXTERNAL_BROWSER_CANNOT_SHOW_PAGE" ).
-                            arg(app->resourceMgr()->stringValue( "ExternalBrowser",
-                                                                platform)).
-                            arg(myHelpFileName));
+                             tr( "EXTERNAL_BROWSER_CANNOT_SHOW_PAGE" ).
+                             arg(app->resourceMgr()->stringValue( "ExternalBrowser",
+                                                                 platform)).
+                             arg(myHelpFileName));
   }
 }
 
@@ -1979,7 +1979,7 @@ void SMESHGUI_GroupDlg::onGeomSelectionButton(bool isBtnOn)
       myCurrentLineEdit = myGeomGroupLine;
       QAction* a = myGeomPopup->exec( QCursor::pos() );
       if (!a || myActions[a] == DIRECT_GEOM_INDEX)
-       setSelectionMode(7);
+        setSelectionMode(7);
     }
   else if (!isBtnOn)
     {
@@ -1999,17 +1999,17 @@ void SMESHGUI_GroupDlg::onGeomPopup( QAction* a )
     {
       mySelectionMode = -1;
       if ( !myShapeByMeshOp ) {
-       myShapeByMeshOp = new SMESHGUI_ShapeByMeshOp(true);
-       connect(myShapeByMeshOp, SIGNAL(committed(SUIT_Operation*)),
-               SLOT(onPublishShapeByMeshDlg(SUIT_Operation*)));
-       connect(myShapeByMeshOp, SIGNAL(aborted(SUIT_Operation*)),
-               SLOT(onCloseShapeByMeshDlg(SUIT_Operation*)));
+        myShapeByMeshOp = new SMESHGUI_ShapeByMeshOp(true);
+        connect(myShapeByMeshOp, SIGNAL(committed(SUIT_Operation*)),
+                SLOT(onPublishShapeByMeshDlg(SUIT_Operation*)));
+        connect(myShapeByMeshOp, SIGNAL(aborted(SUIT_Operation*)),
+                SLOT(onCloseShapeByMeshDlg(SUIT_Operation*)));
       }
       // set mesh object to SMESHGUI_ShapeByMeshOp and start it
       if ( !myMesh->_is_nil() ) {
-       myIsBusy = true;
+        myIsBusy = true;
         hide(); // stop processing selection
-       myIsBusy = false;
+        myIsBusy = false;
         myShapeByMeshOp->setModule( mySMESHGUI );
         myShapeByMeshOp->setStudy( 0 ); // it's really necessary
         myShapeByMeshOp->SetMesh( myMesh );
@@ -2036,12 +2036,12 @@ void SMESHGUI_GroupDlg::onPublishShapeByMeshDlg(SUIT_Operation* op)
       QString ID = aGeomVar->GetStudyEntry();
       _PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
       if ( _PTR(SObject) aGeomSO = aStudy->FindObjectID( ID.toLatin1().data() )) {
-       SALOME_ListIO anIOList;
-       Handle(SALOME_InteractiveObject) anIO = new SALOME_InteractiveObject
-         ( aGeomSO->GetID().c_str(), "SMESH", aGeomSO->GetName().c_str() );
-       anIOList.Append( anIO );
-       mySelectionMgr->setSelectedObjects( anIOList, false );
-       onObjectSelectionChanged();
+        SALOME_ListIO anIOList;
+        Handle(SALOME_InteractiveObject) anIO = new SALOME_InteractiveObject
+          ( aGeomSO->GetID().c_str(), "SMESH", aGeomSO->GetName().c_str() );
+        anIOList.Append( anIO );
+        mySelectionMgr->setSelectedObjects( anIOList, false );
+        onObjectSelectionChanged();
       }
     }
   }
@@ -2069,8 +2069,8 @@ void SMESHGUI_GroupDlg::onCloseShapeByMeshDlg(SUIT_Operation* op)
 void SMESHGUI_GroupDlg::setGroupColor( const SALOMEDS::Color& theColor )
 {
   QColor aQColor( (int)( theColor.R * 255.0 ),
-                 (int)( theColor.G * 255.0 ),
-                 (int)( theColor.B * 255.0 ) );
+                  (int)( theColor.G * 255.0 ),
+                  (int)( theColor.B * 255.0 ) );
   setGroupQColor( aQColor );
 }
 
@@ -2141,8 +2141,8 @@ void SMESHGUI_GroupDlg::setDefaultGroupColor()
 
     SALOMEDS::Color aColor = SMESHGUI::getUniqueColor( aReservedColors );
     aQColor.setRgb( (int)( aColor.R * 255.0 ),
-                   (int)( aColor.G * 255.0 ),
-                   (int)( aColor.B * 255.0 ) );
+                    (int)( aColor.G * 255.0 ),
+                    (int)( aColor.B * 255.0 ) );
 
   }
 
index 44cdfdf94b337e51c4b1ac53d06e50379d15b709..13f5f4a9373c2664df31c17878a9d6aeb1ea824b 100644 (file)
@@ -131,7 +131,7 @@ QWidget* SMESHGUI_GroupOpDlg::createMainFrame( QWidget* theParent )
   QLabel* aColorLab = new QLabel(tr( "SMESH_CHECK_COLOR" ), aColorBox );
   myColorBtn = new QtxColorButton(aColorBox);
   myColorBtn->setSizePolicy( QSizePolicy::MinimumExpanding, 
-                            myColorBtn->sizePolicy().verticalPolicy() );
+                             myColorBtn->sizePolicy().verticalPolicy() );
 
   aColorBoxLayout->addWidget(aColorLab);
   aColorBoxLayout->addWidget(myColorBtn);
@@ -242,7 +242,7 @@ bool SMESHGUI_GroupOpDlg::isValid( const QList<SMESH::SMESH_GroupBase_var>& theL
   if ( theListGrp.isEmpty() )
   {
     SUIT_MessageBox::information( this, tr("SMESH_INSUFFICIENT_DATA"),
-                                 tr("INCORRECT_ARGUMENTS") );
+                                  tr("INCORRECT_ARGUMENTS") );
     return false;
   }
 
@@ -289,14 +289,14 @@ bool SMESHGUI_GroupOpDlg::isValid( const QList<SMESH::SMESH_GroupBase_var>& theL
   if ( aMeshId == -1 )
   {
     SUIT_MessageBox::information(this, tr("SMESH_INSUFFICIENT_DATA"),
-                                tr("DIFF_MESHES"));
+                                 tr("DIFF_MESHES"));
     return false;
   }
 
   if ( aGrpType == -1 ) 
   {
     SUIT_MessageBox::information(this, tr("SMESH_INSUFFICIENT_DATA"),
-                                tr("DIFF_TYPES"));
+                                 tr("DIFF_TYPES"));
     return false;
   }
 
@@ -343,10 +343,10 @@ void SMESHGUI_GroupOpDlg::onHelp()
     platform = "application";
 #endif
     SUIT_MessageBox::warning(this, tr("WRN_WARNING"),
-                            tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
-                            arg(app->resourceMgr()->stringValue("ExternalBrowser",
-                                                                platform)).
-                            arg(myHelpFileName));
+                             tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                             arg(app->resourceMgr()->stringValue("ExternalBrowser",
+                                                                 platform)).
+                             arg(myHelpFileName));
   }
 }
 
@@ -610,7 +610,7 @@ bool SMESHGUI_UnionGroupsDlg::onApply()
   else 
   {
     SUIT_MessageBox::critical(this, tr("SMESH_ERROR"),
-                             tr("SMESH_OPERATION_FAILED"));
+                              tr("SMESH_OPERATION_FAILED"));
     return false;
   }
 }
@@ -712,7 +712,7 @@ bool SMESHGUI_IntersectGroupsDlg::onApply()
   else 
   {
     SUIT_MessageBox::critical(this, tr("SMESH_ERROR"),
-                             tr("SMESH_OPERATION_FAILED"));
+                              tr("SMESH_OPERATION_FAILED"));
     return false;
   }
 }
@@ -878,7 +878,7 @@ bool SMESHGUI_CutGroupsDlg::onApply()
   else 
   {
     SUIT_MessageBox::critical(this, tr("SMESH_ERROR"),
-                             tr("SMESH_OPERATION_FAILED"));
+                              tr("SMESH_OPERATION_FAILED"));
     return false;
   }
 }
@@ -1029,7 +1029,7 @@ bool SMESHGUI_DimGroupDlg::onApply()
   else 
   {
     SUIT_MessageBox::critical(this, tr("SMESH_ERROR"),
-                             tr("SMESH_OPERATION_FAILED"));
+                              tr("SMESH_OPERATION_FAILED"));
     return false;
   }
 }
index e645257e2ebc0d8ac07a9958ab827b8e1d398d15..6b4079b198d0fb19d663324b9f9f1394023e0dbf 100644 (file)
 namespace SMESH
 {
   SMESH::SMESH_Group_var AddGroup( SMESH::SMESH_Mesh_ptr theMesh,
-                                  SMESH::ElementType theType,
-                                  const QString& theGroupName )
+                                   SMESH::ElementType theType,
+                                   const QString& theGroupName )
   {
     SMESH::SMESH_Group_var aGroup;
     try {
       if ( !theMesh->_is_nil() )
-       aGroup = theMesh->CreateGroup( theType, theGroupName.toLatin1().data() );
+        aGroup = theMesh->CreateGroup( theType, theGroupName.toLatin1().data() );
     }
     catch( const SALOME::SALOME_Exception& S_ex ) {
       SalomeApp_Tools::QtCatchCorbaException( S_ex );
index e0673a783a5c68ceb7ee06e3d4510b18c1c2caf2..0482e78c935a9910172d265dbc46fc1eaf112bce 100644 (file)
@@ -40,8 +40,8 @@ namespace SMESH
 {
   SMESHGUI_EXPORT
     SMESH::SMESH_Group_var AddGroup( SMESH::SMESH_Mesh_ptr,
-                                    SMESH::ElementType,
-                                    const QString& );
+                                     SMESH::ElementType,
+                                     const QString& );
 }
 
 #endif // SMESHGUI_GROUPUTILS_H
index cd98e6b4e48748fd7f432573cd11f10dabf63d64..8e9ff3973fee34a75e51c590716bef3f4a3aa729 100644 (file)
@@ -68,7 +68,7 @@ void SMESHGUI_GenericHypothesisCreator::setInitParamsHypothesis(SMESH::SMESH_Hyp
 }
 
 void SMESHGUI_GenericHypothesisCreator::create( SMESH::SMESH_Hypothesis_ptr initParamsHyp,
-                                               const QString& theHypName,
+                                                const QString& theHypName,
                                                 QWidget* parent, QObject* obj, const QString& slot )
 {
   MESSAGE( "Creation of hypothesis with initial params" );
@@ -77,8 +77,8 @@ void SMESHGUI_GenericHypothesisCreator::create( SMESH::SMESH_Hypothesis_ptr init
 }
 
 void SMESHGUI_GenericHypothesisCreator::create( bool isAlgo,
-                                               const QString& theHypName,
-                                               QWidget* theParent, QObject* obj, const QString& slot )
+                                                const QString& theHypName,
+                                                QWidget* theParent, QObject* obj, const QString& slot )
 {
   MESSAGE( "Creation of hypothesis" );
 
@@ -97,8 +97,8 @@ void SMESHGUI_GenericHypothesisCreator::create( bool isAlgo,
 }
 
 void SMESHGUI_GenericHypothesisCreator::edit( SMESH::SMESH_Hypothesis_ptr theHypothesis,
-                                             const QString& theHypName,
-                                             QWidget* theParent, QObject* obj, const QString& slot )
+                                              const QString& theHypName,
+                                              QWidget* theParent, QObject* obj, const QString& slot )
 {
   if( CORBA::is_nil( theHypothesis ) )
     return;
@@ -111,8 +111,8 @@ void SMESHGUI_GenericHypothesisCreator::edit( SMESH::SMESH_Hypothesis_ptr theHyp
 }
 
 void SMESHGUI_GenericHypothesisCreator::editHypothesis( SMESH::SMESH_Hypothesis_ptr h, 
-                                                       const QString& theHypName,
-                                                       QWidget* theParent,
+                                                        const QString& theHypName,
+                                                        QWidget* theParent,
                                                         QObject* obj, const QString& slot )
 {
   myHypName = theHypName;
@@ -173,7 +173,7 @@ QFrame* SMESHGUI_GenericHypothesisCreator::buildStdFrame()
       case QVariant::Int:
         {
           SalomeApp_IntSpinBox* sb = new SalomeApp_IntSpinBox( GroupC1 );
-         sb->setObjectName( (*anIt).myName );
+          sb->setObjectName( (*anIt).myName );
           attuneStdWidget( sb, i );
           sb->setValue( (*anIt).myValue.toInt() );
           connect( sb, SIGNAL( valueChanged( int ) ), this, SLOT( onValueChanged() ) );
@@ -183,7 +183,7 @@ QFrame* SMESHGUI_GenericHypothesisCreator::buildStdFrame()
       case QVariant::Double:
         {
           SalomeApp_DoubleSpinBox* sb = new SMESHGUI_SpinBox( GroupC1 );
-         sb->setObjectName( (*anIt).myName );
+          sb->setObjectName( (*anIt).myName );
           attuneStdWidget( sb, i );
           sb->setValue( (*anIt).myValue.toDouble() );
           connect( sb, SIGNAL( valueChanged( double ) ), this, SLOT( onValueChanged() ) );
@@ -275,13 +275,13 @@ void SMESHGUI_GenericHypothesisCreator::onDialogFinished( int result )
     if( listSOmesh.size() > 0 )
       for( int i = 0; i < listSOmesh.size(); i++ )
       {
-       _PTR(SObject) submSO = listSOmesh[i];
-       SMESH::SMESH_Mesh_var aMesh = SMESH::SObjectToInterface<SMESH::SMESH_Mesh>( submSO );
-       SMESH::SMESH_subMesh_var aSubMesh = SMESH::SObjectToInterface<SMESH::SMESH_subMesh>( submSO );
-       if( !aSubMesh->_is_nil() )
-         aMesh = aSubMesh->GetFather();
-       _PTR(SObject) meshSO = SMESH::FindSObject( aMesh );
-       SMESH::ModifiedMesh( meshSO, false, aMesh->NbNodes()==0);
+        _PTR(SObject) submSO = listSOmesh[i];
+        SMESH::SMESH_Mesh_var aMesh = SMESH::SObjectToInterface<SMESH::SMESH_Mesh>( submSO );
+        SMESH::SMESH_subMesh_var aSubMesh = SMESH::SObjectToInterface<SMESH::SMESH_subMesh>( submSO );
+        if( !aSubMesh->_is_nil() )
+          aMesh = aSubMesh->GetFather();
+        _PTR(SObject) meshSO = SMESH::FindSObject( aMesh );
+        SMESH::ModifiedMesh( meshSO, false, aMesh->NbNodes()==0);
       }
   }
   SMESHGUI::GetSMESHGUI()->updateObjBrowser( true, 0 );
@@ -630,10 +630,10 @@ void SMESHGUI_HypothesisDlg::onHelp()
     platform = "application";
 #endif
     SUIT_MessageBox::warning(this, tr("WRN_WARNING"),
-                            tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
-                            arg(app->resourceMgr()->stringValue("ExternalBrowser", 
-                                                                platform)).
-                            arg(myHelpFileName));
+                             tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                             arg(app->resourceMgr()->stringValue("ExternalBrowser", 
+                                                                 platform)).
+                             arg(myHelpFileName));
   }
 }
 
@@ -648,18 +648,18 @@ void SMESHGUI_HypothesisDlg::setType( const QString& t )
 }
 
 HypothesisData::HypothesisData( const QString& theTypeName,
-                               const QString& thePluginName,
-                               const QString& theServerLibName,
-                               const QString& theClientLibName,
-                               const QString& theLabel,
-                               const QString& theIconId,
-                               const QList<int>& theDim,
-                               const bool theIsAux,
-                               const QStringList& theNeededHypos,
-                               const QStringList& theOptionalHypos,
-                               const QStringList& theInputTypes,
-                               const QStringList& theOutputTypes,
-