Editing hypothesis bug...

This commit is contained in:
dmv 2009-08-24 11:31:32 +00:00
parent 53d936f2cd
commit 96777f9e35

View File

@ -1071,10 +1071,12 @@ void SMESHGUI_MeshOp::createHypothesis (const int theDim,
anObjEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Geom ); anObjEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Geom );
if ( anObjEntry == "" ) { if ( anObjEntry == "" ) {
anObjEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Obj ); anObjEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Obj );
if ( anObjEntry != "" ) {
_PTR(SObject) pObj = studyDS()->FindObjectID( anObjEntry.toLatin1().data() ); _PTR(SObject) pObj = studyDS()->FindObjectID( anObjEntry.toLatin1().data() );
GEOM::GEOM_Object_var aGeomVar = SMESH::GetShapeOnMeshOrSubMesh( pObj ); GEOM::GEOM_Object_var aGeomVar = SMESH::GetShapeOnMeshOrSubMesh( pObj );
anObjEntry = ( aGeomVar->_is_nil() ) ? "" : anObjEntry = aGeomVar->GetStudyEntry(); anObjEntry = ( aGeomVar->_is_nil() ) ? "" : anObjEntry = aGeomVar->GetStudyEntry();
} }
}
aCreator->setShapeEntry( anObjEntry ); aCreator->setShapeEntry( anObjEntry );
myDlg->setEnabled( false ); myDlg->setEnabled( false );
@ -1137,10 +1139,12 @@ void SMESHGUI_MeshOp::onEditHyp( const int theHypType, const int theIndex )
anObjEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Geom ); anObjEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Geom );
if ( anObjEntry == "" ) { if ( anObjEntry == "" ) {
anObjEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Obj ); anObjEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Obj );
if ( anObjEntry != "" ) {
_PTR(SObject) pObj = studyDS()->FindObjectID( anObjEntry.toLatin1().data() ); _PTR(SObject) pObj = studyDS()->FindObjectID( anObjEntry.toLatin1().data() );
GEOM::GEOM_Object_var aGeomVar = SMESH::GetShapeOnMeshOrSubMesh( pObj ); GEOM::GEOM_Object_var aGeomVar = SMESH::GetShapeOnMeshOrSubMesh( pObj );
anObjEntry = aGeomVar->GetStudyEntry(); anObjEntry = aGeomVar->GetStudyEntry();
} }
}
aCreator->setShapeEntry( anObjEntry ); aCreator->setShapeEntry( anObjEntry );
int obj = myDlg->getActiveObject(); int obj = myDlg->getActiveObject();