if(!TSuperClass::Restore(theSObject, theMap))
return NULL;
+ // Check if the icon needs to be updated, update if necessary
+ SALOMEDS::Study_var aStudy = theSObject->GetStudy();
+ SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
+ SALOMEDS::GenericAttribute_var anAttr =
+ aStudyBuilder->FindOrCreateAttribute(theSObject, "AttributePixMap");
+ SALOMEDS::AttributePixMap_var aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr);
+
+ CORBA::String_var aPixMapName = aPixmap->GetPixMap();
+ if(strcmp(GetIconName(), aPixMapName.in()) != 0)
+ aPixmap->SetPixMap(GetIconName());
+
SetIsActiveLocalScalarBar(Storable::FindValue(theMap,"myIsActiveLocalScalarBar").toInt());
SetIsDispGlobalScalarBar(Storable::FindValue(theMap,"myIsDispGlobalScalarBar").toInt());
SetBiColor(Storable::FindValue(theMap,"myIsBiColor").toInt());
UseFixedRange(VISU::Storable::FindValue(theMap,"myIsFixedRange").toInt());
- QString aGeomNames = VISU::Storable::FindValue(theMap, "myGeomNameList");
- QStringList aGeomNameList = QStringList::split("|", aGeomNames);
- int aNbOfGroups = aGeomNameList.count();
- if(aNbOfGroups > 0){
- RemoveAllGeom();
- for(int aGroupNum = 0; aGroupNum < aNbOfGroups; aGroupNum++){
- QString aGroupName = aGeomNameList[aGroupNum];
- AddMeshOnGroup(aGroupName.latin1());
+ bool anIsExists;
+ QString aGeomNames = VISU::Storable::FindValue(theMap, "myGeomNameList", &anIsExists);
+ if(anIsExists){
+ QStringList aGeomNameList = QStringList::split("|", aGeomNames);
+ int aNbOfGroups = aGeomNameList.count();
+ if(aNbOfGroups > 0){
+ RemoveAllGeom();
+ for(int aGroupNum = 0; aGroupNum < aNbOfGroups; aGroupNum++){
+ QString aGroupName = aGeomNameList[aGroupNum];
+ AddMeshOnGroup(aGroupName.latin1());
+ }
}
}
+ // Check if the icon needs to be updated, update if necessary
+ SALOMEDS::Study_var aStudy = theSObject->GetStudy();
+ SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
+ SALOMEDS::GenericAttribute_var anAttr =
+ aStudyBuilder->FindOrCreateAttribute(theSObject, "AttributePixMap");
+ SALOMEDS::AttributePixMap_var aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr);
+
+ CORBA::String_var aPixMapName = aPixmap->GetPixMap();
+ if(strcmp(GetIconName(), aPixMapName.in()) != 0)
+ aPixmap->SetPixMap(GetIconName());
+
return this;
}