mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-04-15 21:21:21 +05:00
Fix TPythonDump::operator<<(const SMESH::ListOfGroups& theList) for an empty list
This commit is contained in:
parent
cc203f62c3
commit
290a70345b
@ -354,21 +354,23 @@ namespace SMESH
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
TPythonDump& TPythonDump::operator<<(const SMESH::ListOfGroups * theList){
|
TPythonDump& TPythonDump::operator<<(const SMESH::ListOfGroups& theList)
|
||||||
if(theList && theList->length() > 0 ) {
|
{
|
||||||
SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
|
SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
|
||||||
SALOMEDS::Study_ptr aStudy = aSMESHGen->GetCurrentStudy();
|
SALOMEDS::Study_ptr aStudy = aSMESHGen->GetCurrentStudy();
|
||||||
myStream << "[";
|
myStream << "[";
|
||||||
int aListLen = theList->length();
|
int aListLen = theList.length();
|
||||||
for(int i = 0 ; i < aListLen; i++){
|
for(int i = 0 ; i < aListLen; i++)
|
||||||
SALOMEDS::SObject_var aSObject = SMESH_Gen_i::ObjectToSObject(aStudy,(*theList)[i]);
|
{
|
||||||
|
SALOMEDS::SObject_var aSObject = SMESH_Gen_i::ObjectToSObject(aStudy,theList[i]);
|
||||||
if(!aSObject->_is_nil()) {
|
if(!aSObject->_is_nil()) {
|
||||||
myStream << aSObject->GetID();
|
CORBA::String_var entry = aSObject->GetID();
|
||||||
i < (aListLen - 1) ? myStream<<", " : myStream<<"]";
|
myStream << entry;
|
||||||
}
|
if ( i < (aListLen - 1) )
|
||||||
|
myStream<<", ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
myStream<<"]";
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,7 +161,7 @@ namespace SMESH
|
|||||||
operator<<(const TCollection_AsciiString & theArg);
|
operator<<(const TCollection_AsciiString & theArg);
|
||||||
|
|
||||||
TPythonDump&
|
TPythonDump&
|
||||||
operator<<(const SMESH::ListOfGroups * theList);
|
operator<<(const SMESH::ListOfGroups& theList);
|
||||||
|
|
||||||
static const char* SMESHGenName() { return "smeshgen"; }
|
static const char* SMESHGenName() { return "smeshgen"; }
|
||||||
static const char* MeshEditorName() { return "mesh_editor"; }
|
static const char* MeshEditorName() { return "mesh_editor"; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user