From: rnv Date: Mon, 21 Mar 2011 08:17:32 +0000 (+0000) Subject: Implementation of the "21056: EDF 1608 SMESH: Dialog Box "Create Sub Mesh": focus... X-Git-Tag: Start_BR_19998_21191~14 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=81dcf377201aed8de5f3fce9759894a8ae59d075;p=modules%2Fsmesh.git Implementation of the "21056: EDF 1608 SMESH: Dialog Box "Create Sub Mesh": focus should automatically switch to geometry" issue. --- diff --git a/src/SMESHGUI/SMESHGUI_MeshOp.cxx b/src/SMESHGUI/SMESHGUI_MeshOp.cxx index 5409b8fae..b8d9d5a01 100644 --- a/src/SMESHGUI/SMESHGUI_MeshOp.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshOp.cxx @@ -612,8 +612,14 @@ void SMESHGUI_MeshOp::selectionDone() QString aMeshEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Mesh ); if ( _PTR(SObject) pMesh = studyDS()->FindObjectID( aMeshEntry.toLatin1().data() )) { SMESH::SMESH_Mesh_var mesh = SMESH::SObjectToInterface( pMesh ); - if ( !mesh->_is_nil() ) + if ( !mesh->_is_nil() ) { + //rnv: issue 21056: EDF 1608 SMESH: Dialog Box "Create Sub Mesh": focus should automatically switch to geometry + QString aGeomEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Geom ); + _PTR(SObject) pGeom = studyDS()->FindObjectID( aGeomEntry.toLatin1().data() ); + if ( !pGeom || GEOM::GEOM_Object::_narrow( _CAST( SObject,pGeom )->GetObject() )->_is_nil() ) + myDlg->activateObject(SMESHGUI_MeshDlg::Geom); enable = ( shapeDim > 1 ) && ( mesh->NbEdges() > 0 ); + } } myDlg->setGeomPopupEnabled( enable ); }