0020210: EDF SMESH 976: Update of a smesh group after modification of the associated geom group

+  static void SetPixMap(SALOMEDS::SObject_ptr theSObject,
+                        const char*           thePixMap);
This commit is contained in:
eap 2009-04-03 14:30:42 +00:00
parent dd496074b4
commit 908ed4f2a2
2 changed files with 22 additions and 0 deletions

View File

@ -464,6 +464,9 @@ public:
const char* theName,
const char* theDefaultName = 0);
static void SetPixMap(SALOMEDS::SObject_ptr theSObject,
const char* thePixMap);
// Get study context
StudyContext* GetCurrentStudyContext();

View File

@ -298,6 +298,25 @@ void SMESH_Gen_i::SetName(SALOMEDS::SObject_ptr theSObject,
}
}
//=======================================================================
//function : SetPixMap
//purpose :
//=======================================================================
void SMESH_Gen_i::SetPixMap(SALOMEDS::SObject_ptr theSObject,
const char* thePixMap)
{
if ( !theSObject->_is_nil() && thePixMap && strlen( thePixMap ))
{
SALOMEDS::Study_var aStudy = theSObject->GetStudy();
SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
SALOMEDS::GenericAttribute_var anAttr =
aStudyBuilder->FindOrCreateAttribute( theSObject, "AttributePixMap" );
SALOMEDS::AttributePixMap_var aPMAttr = SALOMEDS::AttributePixMap::_narrow( anAttr );
aPMAttr->SetPixMap( thePixMap );
}
}
//=======================================================================
//function : addReference
//purpose :