}
SMESH::SMESH_Mesh_var aMeshByIO = SMESH::GetMeshByIO(anIObject);
-
SMESH::SelectionProxy aMesh = SMESH::SelectionProxy(aMeshItem);
SMESH::MedInfo anInfo = aMesh.medFileInfo();
if (!anInfo.isValid())
continue;
+ SMESH::ListOfGroups aGroups = *aMeshByIO->GetGroups();
+ for (int i = 0; i < aGroups.length(); ++i)
+ {
+ auto X = aGroups[i];
+ _PTR(SObject) aGroupSObject = SMESH::FindSObject(X);
+ SMESH_Actor* anActor = SMESH::FindActorByEntry(aGroupSObject->GetID().c_str());
+ SMESH::smIdType_array aMeshInfo = *X->GetMeshInfo();
+
+ if (anActor)
+ {
+ vtkTypeBool isVisib = anActor->GetVisibility();
+ SMESH::UpdateView(!isVisib ? SMESH::eDisplay : SMESH::eErase, aGroupSObject->GetID().c_str());
+ }
+ else
+ SMESH::UpdateView(SMESH::eErase, aGroupSObject->GetID().c_str());
+ }
+
SMESH::mesh_array_var aMeshes = new SMESH::mesh_array;
{
// re-import mesh
anApp->browseObjects(anEntryList);
}
- SMESH::SMESH_GroupBase_var aGroup = SMESH::SMESH_GroupBase::_narrow(aMeshItem);\
+ SMESH::SMESH_GroupBase_var aGroup = SMESH::SMESH_GroupBase::_narrow(aMeshItem);
QString aMeshName = anIObject->getName();
aMeshList.append(QPair< SMESH::SMESH_IDSource_var, QString >(aMeshItem, aMeshName));
SMESH::mesh_array* SMESH_Gen_i::ReloadMeshesFromMED(const char* theFileName, SMESH::SMESH_Mesh_ptr sourceMesh, SMESH::DriverMED_ReadStatus& theStatus)
{
+ SMESH::ListOfGroups anOldGroups = *sourceMesh->GetGroups();
checkFileReadable(theFileName);
#ifdef WIN32
if (status1 > theStatus)
theStatus = status1;
+ for (int i = 0; i < anOldGroups.length(); ++i)
+ {
+ //auto X = anOldGroups[i];
+ sourceMesh->RemoveGroup(anOldGroups[i]);
+ }
aResult[i++] = SMESH::SMESH_Mesh::_duplicate(sourceMesh);
+
meshServant->GetImpl().GetMeshDS()->Modified();
}
if (!aStudyBuilder->_is_nil())