]> SALOME platform Git repositories - modules/smesh.git/blobdiff - src/DriverMED/DriverMED_Family.cxx
Salome HOME
Fix for Bug IPAL17943
[modules/smesh.git] / src / DriverMED / DriverMED_Family.cxx
index 0da2c4cffa942131a326e1a762c981e705cd08ed..16363f8e63ee46d80c9c2188d80a5708758cbd0e 100644 (file)
@@ -16,7 +16,7 @@
 //  License along with this library; if not, write to the Free Software 
 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
 // 
-//  See http://www.salome-platform.org or email : webmaster.salome@opencascade.org
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 //
 //
@@ -321,7 +321,7 @@ DriverMED_Family::GetFamilyInfo(const MED::PWrapper& theWrapper,
 
   MED::PFamilyInfo anInfo;
   string aValue = aStr.str();
-  if(myId == 0){
+  if(myId == 0 || myGroupAttributVal == 0){
     anInfo = theWrapper->CrFamilyInfo(theMeshInfo,
                                      aValue,
                                      myId,
@@ -329,8 +329,7 @@ DriverMED_Family::GetFamilyInfo(const MED::PWrapper& theWrapper,
   }else{
     MED::TStringVector anAttrDescs (1, "");  // 1 attribute with empty description,
     MED::TIntVector anAttrIds (1, myId);        // Id=0,
-    MED::TIntVector anAttrVals (1);
-    anAttrVals[0] = myGroupAttributVal != 0? myGroupAttributVal: myId;
+    MED::TIntVector anAttrVals (1, myGroupAttributVal);
     anInfo = theWrapper->CrFamilyInfo(theMeshInfo,
                                      aValue,
                                      myId,
@@ -382,13 +381,8 @@ void DriverMED_Family::Init (SMESHDS_GroupBase* theGroup)
   myGroupNames.clear();
   myGroupNames.insert(string(theGroup->GetStoreName()));
 
-  myGroupAttributVal = 0;
-  
-  if (theGroup->GetColorGroup()!=0)
-    {
-      myGroupAttributVal = theGroup->GetColorGroup();
-    }
-
+  Quantity_Color aColor = theGroup->GetColor();
+  myGroupAttributVal = aColor.Hue();
 }
 
 //=============================================================================