mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-11-15 10:08:34 +05:00
0021014: EDF 1583 SMESH: Improvement of the Python Dump for the creation of groups
Make groupType() return "SMESH_GroupOnFilter"
This commit is contained in:
parent
74a4f1012d
commit
00d6e38575
@ -661,17 +661,19 @@ QString SMESHGUI_Selection::groupType( int ind ) const
|
||||
{
|
||||
QString e = entry( ind );
|
||||
_PTR(SObject) SO = SMESH::GetActiveStudyDocument()->FindObjectID( e.toLatin1().constData() );
|
||||
QString type;
|
||||
if( SO )
|
||||
{
|
||||
CORBA::Object_var obj = SMESH::SObjectToObject( SO );
|
||||
SMESH::SMESH_Group_var g = SMESH::SObjectToInterface<SMESH::SMESH_Group>( SO );
|
||||
if( !g->_is_nil() )
|
||||
return "Group";
|
||||
|
||||
SMESH::SMESH_Group_var aGroup = SMESH::SMESH_Group::_narrow( obj );
|
||||
SMESH::SMESH_GroupOnGeom_var aGroupOnGeom = SMESH::SMESH_GroupOnGeom::_narrow( obj );
|
||||
if( !aGroup->_is_nil() )
|
||||
type = QString( "Group" );
|
||||
else if ( !aGroupOnGeom->_is_nil() )
|
||||
type = QString( "GroupOnGeom" );
|
||||
SMESH::SMESH_GroupOnGeom_var gog = SMESH::SObjectToInterface<SMESH::SMESH_GroupOnGeom>( SO );
|
||||
if( !gog->_is_nil() )
|
||||
return "GroupOnGeom";
|
||||
|
||||
SMESH::SMESH_GroupOnFilter_var gof = SMESH::SObjectToInterface<SMESH::SMESH_GroupOnFilter>(SO);
|
||||
if ( !gof->_is_nil() )
|
||||
return "GroupOnFilter";
|
||||
}
|
||||
return type;
|
||||
return "";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user