Salome HOME
021382: EDF 1985 SMESH: Read/write of .mesh files (GMF format)
authoreap <eap@opencascade.com>
Mon, 24 Sep 2012 11:17:56 +0000 (11:17 +0000)
committereap <eap@opencascade.com>
Mon, 24 Sep 2012 11:17:56 +0000 (11:17 +0000)
  when setting myName, call myGroupDS->SetStoreName( myName )

src/SMESH/SMESH_Group.cxx
src/SMESH/SMESH_Group.hxx

index 7ef568593a2f492f535a7fb6a1b0934fa444a11f..dae4e3188a91d31d9013538df35bf7222b062b57 100644 (file)
@@ -24,7 +24,6 @@
 //  File   : SMESH_Group.cxx
 //  Author : Michael Sazonov (OCC)
 //  Module : SMESH
-//  $Header$
 //
 #include "SMESH_Group.hxx"
 #include "SMESH_Mesh.hxx"
@@ -60,6 +59,7 @@ SMESH_Group::SMESH_Group (int                       theID,
     myGroupDS = new SMESHDS_Group (theID,
                                    const_cast<SMESH_Mesh*>(theMesh)->GetMeshDS(),
                                    theType);
+  myGroupDS->SetStoreName( theName );
 }
 
 //================================================================================
@@ -76,7 +76,7 @@ SMESH_Group::SMESH_Group (SMESHDS_GroupBase* groupDS): myGroupDS( groupDS )
 
 //=============================================================================
 /*!
- *  
+ *  Destructor deletes myGroupDS
  */
 //=============================================================================
 
@@ -84,3 +84,15 @@ SMESH_Group::~SMESH_Group ()
 {
   delete myGroupDS; myGroupDS=0;
 }
+
+//================================================================================
+/*!
+ * \brief Sets a new name
+ */
+//================================================================================
+
+void SMESH_Group::SetName (const char* theName)
+{
+  myName = theName;
+  myGroupDS->SetStoreName( theName );
+}
index f378be29696008a32361cbc0a2c04536b002abf5..edb14b900522e2b4c901770ae4e047d0a0e7b5db 100644 (file)
@@ -52,7 +52,7 @@ class SMESH_EXPORT  SMESH_Group
   SMESH_Group (SMESHDS_GroupBase* groupDS);
   ~SMESH_Group ();
 
-  void SetName (const char* theName) { myName = theName; }
+  void SetName (const char* theName);
 
   const char* GetName () const { return myName.c_str(); }