From: dmv Date: Tue, 15 Sep 2009 14:16:35 +0000 (+0000) Subject: 0020082: EDF 869 GEOM : Edges Orientation indicator/reverse X-Git-Tag: V5_1_3rc1~48 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=067947492f1793a9646f75dd6c6eff12717dae4e;p=modules%2Fsmesh.git 0020082: EDF 869 GEOM : Edges Orientation indicator/reverse --- diff --git a/src/SMESHGUI/SMESHGUI_MeshOp.cxx b/src/SMESHGUI/SMESHGUI_MeshOp.cxx index 310f34d3f..ef2f01528 100644 --- a/src/SMESHGUI/SMESHGUI_MeshOp.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshOp.cxx @@ -1085,7 +1085,8 @@ void SMESHGUI_MeshOp::createHypothesis(const int theDim, if ( aMeshEntry == "" && aGeomEntry == "" ) { _PTR(SObject) pObj = studyDS()->FindObjectID( anObjEntry.toLatin1().data() ); GEOM::GEOM_Object_var aGeomVar = SMESH::GetShapeOnMeshOrSubMesh( pObj ); - aGeomEntry = aGeomVar->GetStudyEntry(); + if ( !aGeomVar->_is_nil() ) + aGeomEntry = aGeomVar->GetStudyEntry(); } if ( anObjEntry != "" && aGeomEntry != "" && aMeshEntry == "" ) { // take geometry from submesh @@ -1099,7 +1100,8 @@ void SMESHGUI_MeshOp::createHypothesis(const int theDim, if ( !aMeshVar->_is_nil() ) { _PTR(SObject) aMeshSO = SMESH::FindSObject( aMeshVar ); GEOM::GEOM_Object_var aGeomVar = SMESH::GetShapeOnMeshOrSubMesh( aMeshSO ); - aMeshEntry = aGeomVar->GetStudyEntry(); + if ( !aGeomVar->_is_nil() ) + aMeshEntry = aGeomVar->GetStudyEntry(); } } } @@ -1206,7 +1208,8 @@ void SMESHGUI_MeshOp::onEditHyp( const int theHypType, const int theIndex ) if ( aMeshEntry == "" && aGeomEntry == "" ) { _PTR(SObject) pObj = studyDS()->FindObjectID( anObjEntry.toLatin1().data() ); GEOM::GEOM_Object_var aGeomVar = SMESH::GetShapeOnMeshOrSubMesh( pObj ); - aGeomEntry = aGeomVar->GetStudyEntry(); + if ( !aGeomVar->_is_nil() ) + aGeomEntry = aGeomVar->GetStudyEntry(); } if ( anObjEntry != "" && aGeomEntry != "" && aMeshEntry == "" ) { // take geometry from submesh @@ -1220,7 +1223,8 @@ void SMESHGUI_MeshOp::onEditHyp( const int theHypType, const int theIndex ) if ( !aMeshVar->_is_nil() ) { _PTR(SObject) aMeshSO = SMESH::FindSObject( aMeshVar ); GEOM::GEOM_Object_var aGeomVar = SMESH::GetShapeOnMeshOrSubMesh( aMeshSO ); - aMeshEntry = aGeomVar->GetStudyEntry(); + if ( !aGeomVar->_is_nil() ) + aMeshEntry = aGeomVar->GetStudyEntry(); } } } diff --git a/src/StdMeshersGUI/StdMeshersGUI_SubShapeSelectorWdg.cxx b/src/StdMeshersGUI/StdMeshersGUI_SubShapeSelectorWdg.cxx index 0705f5711..ba9bd7e3e 100644 --- a/src/StdMeshersGUI/StdMeshersGUI_SubShapeSelectorWdg.cxx +++ b/src/StdMeshersGUI/StdMeshersGUI_SubShapeSelectorWdg.cxx @@ -475,8 +475,10 @@ const char* StdMeshersGUI_SubShapeSelectorWdg::GetMainShapeEntry() //================================================================================= QList StdMeshersGUI_SubShapeSelectorWdg::GetCorrectedListOfIDs( bool fromSubshapeToMainshape ) { - if ( myMainShape.IsNull() || myGeomShape.IsNull() ) + if ( ( myMainShape.IsNull() || myGeomShape.IsNull() ) && fromSubshapeToMainshape ) return myListOfIDs; + else if ( ( myMainShape.IsNull() || myGeomShape.IsNull() ) && !fromSubshapeToMainshape ) + return mySelectedIDs; QList aList; TopTools_IndexedMapOfShape aGeomMap;