Salome HOME
IMP: SMESH: Japanese translations
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_RotationDlg.cxx
index 4c495d65e24c83a390e483210df7bf0e32fc6ba7..c53aa66cbcfa1d39ee9f26c603a75401d7124916 100644 (file)
@@ -85,9 +85,6 @@ enum { MOVE_ELEMS_BUTTON = 0, COPY_ELEMS_BUTTON, MAKE_MESH_BUTTON }; //!< action
 #define SPACING 8
 #define MARGIN  11
 
-//To disable automatic genericobj management, the following line should be commented.
-//Otherwise, it should be uncommented. Refer to KERNEL_SRC/src/SALOMEDSImpl/SALOMEDSImpl_AttributeIOR.cxx
-#define WITHGENERICOBJ
 
 //=================================================================================
 // class    : SMESHGUI_RotationDlg()
@@ -494,12 +491,6 @@ bool SMESHGUI_RotationDlg::ClickOnApply()
            if (!mesh->_is_nil()) {
              if( _PTR(SObject) aSObject = SMESH::ObjectToSObject( mesh ) )
                anEntryList.append( aSObject->GetID().c_str() );
-#ifdef WITHGENERICOBJ
-             // obj has been published in study. Its refcount has been incremented.
-             // It is safe to decrement its refcount
-             // so that it will be destroyed when the entry in study will be removed
-             mesh->UnRegister();
-#endif
            }
          }
        }
@@ -511,12 +502,6 @@ bool SMESHGUI_RotationDlg::ClickOnApply()
          if (!mesh->_is_nil()) {
            if( _PTR(SObject) aSObject = SMESH::ObjectToSObject( mesh ) )
              anEntryList.append( aSObject->GetID().c_str() );
-#ifdef WITHGENERICOBJ
-           // obj has been published in study. Its refcount has been incremented.
-           // It is safe to decrement its refcount
-           // so that it will be destroyed when the entry in study will be removed
-           mesh->UnRegister();
-#endif
          }
        }
         break;
@@ -525,8 +510,10 @@ bool SMESHGUI_RotationDlg::ClickOnApply()
     } catch (...) {
     }
 
-    for ( int i = 0; i < myMeshes.count(); i++ ) 
-      SMESH::Update( (SMESH::FindActorByObject( myMeshes[i] ))->getIO(), true );
+    for ( int i = 0; i < myObjects.count(); i++ ) {
+      SMESH_Actor* actor = SMESH::FindActorByObject( myObjects[i] );
+      if ( actor ) SMESH::Update( actor->getIO(), true );
+    }
    
     if ( ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() ) ||
          actionButton == MAKE_MESH_BUTTON ) {