mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-18 11:00:36 +05:00
in PublishGroup(), for the standalone groups, set full ot empty icon
depending on availability of elements of type of the group in the mesh
This commit is contained in:
parent
5dda5df854
commit
8801aa27ed
@ -698,10 +698,18 @@ SALOMEDS::SObject_ptr SMESH_Gen_i::PublishGroup (SALOMEDS::Study_ptr theStudy
|
|||||||
|
|
||||||
// Add new group to corresponding sub-tree
|
// Add new group to corresponding sub-tree
|
||||||
SMESH::array_of_ElementType_var elemTypes = theGroup->GetTypes();
|
SMESH::array_of_ElementType_var elemTypes = theGroup->GetTypes();
|
||||||
const int isEmpty = ( elemTypes->length() == 0 );
|
int isEmpty = ( elemTypes->length() == 0 );
|
||||||
std::string pm[2] = { "ICON_SMESH_TREE_GROUP", "ICON_SMESH_TREE_MESH_WARN" };
|
std::string pm[2] = { "ICON_SMESH_TREE_GROUP", "ICON_SMESH_TREE_MESH_WARN" };
|
||||||
if ( SMESH::DownCast< SMESH_GroupOnFilter_i* > ( theGroup ))
|
if ( SMESH::DownCast< SMESH_GroupOnFilter_i* > ( theGroup ))
|
||||||
|
{
|
||||||
pm[0] = "ICON_SMESH_TREE_GROUP_ON_FILTER";
|
pm[0] = "ICON_SMESH_TREE_GROUP_ON_FILTER";
|
||||||
|
}
|
||||||
|
else if ( SMESH::DownCast< SMESH_Group_i* > ( theGroup ))
|
||||||
|
{
|
||||||
|
SMESH::array_of_ElementType_var allElemTypes = theMesh->GetTypes();
|
||||||
|
for ( size_t i =0; i < allElemTypes->length() && isEmpty; ++i )
|
||||||
|
isEmpty = ( allElemTypes[i] != theGroup->GetType() );
|
||||||
|
}
|
||||||
aGroupSO = publish (theStudy, theGroup, aRootSO, 0, pm[isEmpty].c_str() );
|
aGroupSO = publish (theStudy, theGroup, aRootSO, 0, pm[isEmpty].c_str() );
|
||||||
}
|
}
|
||||||
if ( aGroupSO->_is_nil() )
|
if ( aGroupSO->_is_nil() )
|
||||||
|
Loading…
Reference in New Issue
Block a user