From b39db60480eb3e8f82b101a9fd787d048f11f56b Mon Sep 17 00:00:00 2001 From: mzn Date: Tue, 31 Oct 2006 10:53:13 +0000 Subject: [PATCH] Fix for PAL13607(EDF PAL 313 : Random group colors when unassigned). --- src/DriverMED/DriverMED_Family.cxx | 5 ++--- src/SMESHDS/SMESHDS_GroupBase.cxx | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/DriverMED/DriverMED_Family.cxx b/src/DriverMED/DriverMED_Family.cxx index ebd21783d..45438ee6d 100644 --- a/src/DriverMED/DriverMED_Family.cxx +++ b/src/DriverMED/DriverMED_Family.cxx @@ -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, diff --git a/src/SMESHDS/SMESHDS_GroupBase.cxx b/src/SMESHDS/SMESHDS_GroupBase.cxx index 52b21e168..e374b723b 100644 --- a/src/SMESHDS/SMESHDS_GroupBase.cxx +++ b/src/SMESHDS/SMESHDS_GroupBase.cxx @@ -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) { } -- 2.30.2