Fix for PAL13607(EDF PAL 313 : Random group colors when unassigned).

This commit is contained in:
mzn 2006-10-31 10:53:13 +00:00
parent 14b41fa561
commit b39db60480
2 changed files with 3 additions and 4 deletions

View File

@ -321,7 +321,7 @@ DriverMED_Family::GetFamilyInfo(const MED::PWrapper& theWrapper,
MED::PFamilyInfo anInfo; MED::PFamilyInfo anInfo;
string aValue = aStr.str(); string aValue = aStr.str();
if(myId == 0){ if(myId == 0 || myGroupAttributVal == 0){
anInfo = theWrapper->CrFamilyInfo(theMeshInfo, anInfo = theWrapper->CrFamilyInfo(theMeshInfo,
aValue, aValue,
myId, myId,
@ -329,8 +329,7 @@ DriverMED_Family::GetFamilyInfo(const MED::PWrapper& theWrapper,
}else{ }else{
MED::TStringVector anAttrDescs (1, ""); // 1 attribute with empty description, MED::TStringVector anAttrDescs (1, ""); // 1 attribute with empty description,
MED::TIntVector anAttrIds (1, myId); // Id=0, MED::TIntVector anAttrIds (1, myId); // Id=0,
MED::TIntVector anAttrVals (1); MED::TIntVector anAttrVals (1, myGroupAttributVal);
anAttrVals[0] = myGroupAttributVal != 0? myGroupAttributVal: myId;
anInfo = theWrapper->CrFamilyInfo(theMeshInfo, anInfo = theWrapper->CrFamilyInfo(theMeshInfo,
aValue, aValue,
myId, myId,

View File

@ -41,7 +41,7 @@ SMESHDS_GroupBase::SMESHDS_GroupBase (const int theID,
const SMESHDS_Mesh* theMesh, const SMESHDS_Mesh* theMesh,
const SMDSAbs_ElementType theType): const SMDSAbs_ElementType theType):
myID(theID), myMesh(theMesh), myType(theType), myStoreName(""), myID(theID), myMesh(theMesh), myType(theType), myStoreName(""),
myCurIndex(0), myCurID(-1) myCurIndex(0), myCurID(-1), myColorGroup(0)
{ {
} }