In GetSourceSubMeshes(), fix getting a main sub-mesh of a not loaded mesh
StdMeshers_ImportSource1D::GetSourceSubMeshes(const SMESH_Mesh* srcMesh) const
{
if ( !srcMesh->HasShapeToMesh() )
- return vector<SMESH_subMesh*>(1, srcMesh->GetSubMeshContaining(1));
-
+ {
+ SMESH_Mesh* srcM = const_cast< SMESH_Mesh* >( srcMesh );
+ return vector<SMESH_subMesh*>(1, srcM->GetSubMesh( srcM->GetShapeToMesh()));
+ }
set<int> shapeIDs;
const vector<SMESH_Group*>& groups = GetGroups();
const SMESHDS_Mesh * srcMeshDS = srcMesh->GetMeshDS();