Salome HOME
SALOME Forum bug: sub-mesh removal leads to an Exception in a re-opened study.
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_RotationDlg.cxx
index c451a29c4653085edb1a164a6f716bb822fc1410..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;