Salome HOME
Fix for PAL13607(EDF PAL 313 : Random group colors when unassigned).
authormzn <mzn@opencascade.com>
Tue, 31 Oct 2006 10:53:13 +0000 (10:53 +0000)
committermzn <mzn@opencascade.com>
Tue, 31 Oct 2006 10:53:13 +0000 (10:53 +0000)
src/DriverMED/DriverMED_Family.cxx
src/SMESHDS/SMESHDS_GroupBase.cxx

index ebd21783d30a864de549c566bd9099a05e60e2ea..45438ee6d203f461bff50895b53455bf9f8b8b71 100644 (file)
@@ -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,
index 52b21e168e21262a413d0dc3fb1b07dfd90f2e2c..e374b723bdb5024fb167b22c2618da8877ae3309 100644 (file)
@@ -41,7 +41,7 @@ SMESHDS_GroupBase::SMESHDS_GroupBase (const int                 theID,
                                       const SMESHDS_Mesh*       theMesh,
                                       const SMDSAbs_ElementType theType):
        myID(theID), myMesh(theMesh), myType(theType), myStoreName(""),
-       myCurIndex(0), myCurID(-1)
+       myCurIndex(0), myCurID(-1), myColorGroup(0)
 {
 }