IPAL21302 Selection of the Hypothesis without Geometry leads to Unknown exception. Regress to 5.1.2

This commit is contained in:
eap 2009-08-11 09:09:55 +00:00
parent 5746a53aa7
commit eee601b7b1

View File

@ -1070,10 +1070,10 @@ void SMESHGUI_MeshOp::createHypothesis (const int theDim,
QString anObjEntry = "";
anObjEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Geom );
if ( anObjEntry == "" ) {
anObjEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Obj );
anObjEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Obj );
_PTR(SObject) pObj = studyDS()->FindObjectID( anObjEntry.toLatin1().data() );
GEOM::GEOM_Object_var aGeomVar = SMESH::GetShapeOnMeshOrSubMesh( pObj );
anObjEntry = aGeomVar->GetStudyEntry();
anObjEntry = ( aGeomVar->_is_nil() ) ? "" : anObjEntry = aGeomVar->GetStudyEntry();
}
aCreator->setShapeEntry( anObjEntry );