geomGen = GEOM::GEOM_Gen::_narrow(comp);
}
}
- if (!CORBA::is_nil(geomGen)) {
+ if (!CORBA::is_nil(geomGen))
+ {
geomGen->BreakLink(aREntry.toStdString().c_str());
SMESHGUI::GetSMESHGUI()->updateObjBrowser();
+
+ // remove actors whose objects are removed by BreakLink()
+ QList<SUIT_ViewWindow*> wndList = SMESHGUI::desktop()->windows();
+ SUIT_ViewWindow* wnd;
+ foreach(wnd, wndList)
+ SMESH::UpdateActorsAfterUpdateStudy(wnd);
}
}
}
GEOM::GEOM_Object_wrap geom = FindGeometryByMeshElement(theMesh, theElementID);
if ( !geom->_is_nil() ) {
GEOM::GEOM_Object_var mainShape = theMesh->GetShapeToMesh();
- GEOM::GEOM_Gen_ptr geomGen = GetGeomEngine( geom );
+ GEOM::GEOM_Gen_var geomGen = GetGeomEngine( geom );
// try to find the corresponding SObject
SALOMEDS::SObject_wrap SObj = ObjectToSObject( geom.in() );
}
}
}
- if ( SObj->_is_nil() ) // publish a new subshape
+ if ( SObj->_is_nil() && !geomGen->_is_nil() ) // publish a new subshape
SObj = geomGen->AddInStudy( geom, theGeomName, mainShape );
// return only published geometry
THROW_SALOME_CORBA_EXCEPTION( "bad Mesh reference", SALOME::BAD_PARAM );
GEOM::GEOM_Object_var mainShape = theMesh->GetShapeToMesh();
- GEOM::GEOM_Gen_ptr geomGen = GetGeomEngine( mainShape );
+ GEOM::GEOM_Gen_var geomGen = GetGeomEngine( mainShape );
// get a core mesh DS
SMESH_Mesh_i* meshServant = SMESH::DownCast<SMESH_Mesh_i*>( theMesh );
}
if ( !it->_is_nil() ) {
for ( it->InitEx(true); it->More(); it->Next() ) {
- SALOMEDS::SObject_wrap so = it->Value();
+ SALOMEDS::SObject_wrap so = it->Value();
CORBA::Object_var obj = SObjectToObject( so );
GEOM::GEOM_Object_var subGeom = GEOM::GEOM_Object::_narrow( obj );
if ( !subGeom->_is_nil() ) {