if ( !sameIOR )
{
iorAttr->SetValue( objStr.in() );
- // UnRegister() !!! --> No: random problems when meshing in parallel (yacs foreach) in distributed python scripts
-// SALOME::GenericObj_var genObj = SALOME::GenericObj::_narrow( theIOR );
-// if ( !genObj->_is_nil() )
-// genObj->UnRegister();
+ // UnRegister() !!! --> random problems when meshing in parallel (yacs foreach) in
+ // distributed python scripts, because simultaneously created meshes are
+ // published into the same SO; as a result the mesh published first dies
+ SALOME::GenericObj_var genObj = SALOME::GenericObj::_narrow( theIOR );
+ if ( !genObj->_is_nil() )
+ genObj->UnRegister();
}
}
else
aTag++;
- aMeshSO = publish ( theMesh, father, aTag, "ICON_SMESH_TREE_MESH_WARN" );
+ aMeshSO = publish( theMesh, father, aTag, "ICON_SMESH_TREE_MESH_WARN" );
if ( aMeshSO->_is_nil() )
return aMeshSO._retn();
}
SetPixMap( so, "ICON_SMESH_TREE_MESH_WARN" );
else if ( mesh_i->IsComputedOK() )
SetPixMap( so, "ICON_SMESH_TREE_MESH" );
- else
+ else if ( mesh_i->HasShapeToMesh() )
SetPixMap( so, "ICON_SMESH_TREE_MESH_PARTIAL" );
+ else
+ SetPixMap( so, "ICON_SMESH_TREE_MESH_IMPORTED" );
// set icons of sub-objects
SALOMEDS::Study_var study = getStudyServant();
}
return 0;
}
+
+//=======================================================================
+//function : Clear
+//purpose : clear data
+//=======================================================================
+
+void StudyContext::Clear()
+{
+ mapIdToIOR.Clear();
+ mapIdToId.Clear();
+}