mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-24 08:20:34 +05:00
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:
parent
dd496074b4
commit
908ed4f2a2
@ -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();
|
||||
|
||||
|
@ -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 :
|
||||
|
Loading…
Reference in New Issue
Block a user