]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
untabify
authoreap <eap@opencascade.com>
Thu, 5 May 2011 15:15:01 +0000 (15:15 +0000)
committereap <eap@opencascade.com>
Thu, 5 May 2011 15:15:01 +0000 (15:15 +0000)
src/SMESHGUI/SMESHGUI.cxx

index c1c9118ec6e9d35bbce456f76c33f7ddbc7a4f0f..5ac31492211a0be64dd7adf63b1c2c980596107a 100644 (file)
@@ -5750,25 +5750,25 @@ bool SMESHGUI::renameObject( const QString& entry, const QString& name) {
       // check type to prevent renaming of inappropriate objects
       int aType = SMESHGUI_Selection::type( qPrintable(entry), aStudy );
       if (aType == MESH || aType == GROUP ||
-         aType == SUBMESH || aType == SUBMESH_COMPOUND ||
-         aType == SUBMESH_SOLID || aType == SUBMESH_FACE ||
-         aType == SUBMESH_EDGE || aType == SUBMESH_VERTEX ||
-         aType == HYPOTHESIS || aType == ALGORITHM) {
-       if ( !name.isEmpty() ) {
-         SMESHGUI::GetSMESHGen()->SetName(obj->GetIOR().c_str(), qPrintable(name) );
-         
-         // update name of group object and its actor
-         Handle(SALOME_InteractiveObject) IObject = 
-           new SALOME_InteractiveObject ( qPrintable(entry), "SMESH", qPrintable(name) );
-         
-         SMESH::SMESH_GroupBase_var aGroupObject = SMESH::IObjectToInterface<SMESH::SMESH_GroupBase>(IObject);
-         if( !aGroupObject->_is_nil() ) {
-           aGroupObject->SetName( qPrintable(name) );
-           if ( SMESH_Actor *anActor = SMESH::FindActorByEntry( qPrintable(entry) ) )
-             anActor->setName( qPrintable(name) );
-         }
-         return true;
-       }
+          aType == SUBMESH || aType == SUBMESH_COMPOUND ||
+          aType == SUBMESH_SOLID || aType == SUBMESH_FACE ||
+          aType == SUBMESH_EDGE || aType == SUBMESH_VERTEX ||
+          aType == HYPOTHESIS || aType == ALGORITHM) {
+        if ( !name.isEmpty() ) {
+          SMESHGUI::GetSMESHGen()->SetName(obj->GetIOR().c_str(), qPrintable(name) );
+          
+          // update name of group object and its actor
+          Handle(SALOME_InteractiveObject) IObject = 
+            new SALOME_InteractiveObject ( qPrintable(entry), "SMESH", qPrintable(name) );
+          
+          SMESH::SMESH_GroupBase_var aGroupObject = SMESH::IObjectToInterface<SMESH::SMESH_GroupBase>(IObject);
+          if( !aGroupObject->_is_nil() ) {
+            aGroupObject->SetName( qPrintable(name) );
+            if ( SMESH_Actor *anActor = SMESH::FindActorByEntry( qPrintable(entry) ) )
+              anActor->setName( qPrintable(name) );
+          }
+          return true;
+        }
       }  
     }
   }