From: eap Date: Tue, 27 Apr 2010 09:42:53 +0000 (+0000) Subject: PAL21717: default values of hypothesis for sub-mesh X-Git-Tag: V5_1_4rc1~21 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b81483e2d953c4add2e1b653e855f1e66d7bf258;p=modules%2Fsmesh.git PAL21717: default values of hypothesis for sub-mesh Use default hyp value if submesh is not meshed --- diff --git a/src/SMESHGUI/SMESHGUI_MeshOp.cxx b/src/SMESHGUI/SMESHGUI_MeshOp.cxx index ab3fb0611..1739b419c 100644 --- a/src/SMESHGUI/SMESHGUI_MeshOp.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshOp.cxx @@ -946,12 +946,19 @@ SMESHGUI_MeshOp::getInitParamsHypothesis( const QString& aHypType, } } - return SMESHGUI::GetSMESHGen()->GetHypothesisParameterValues( aHypType.toLatin1().data(), - aServerLib.toLatin1().data(), - aMeshVar, - aGeomVar, - /*byMesh = */isSubMesh); - + SMESH::SMESH_Hypothesis_var hyp = + SMESHGUI::GetSMESHGen()->GetHypothesisParameterValues( aHypType.toLatin1().data(), + aServerLib.toLatin1().data(), + aMeshVar, + aGeomVar, + /*byMesh = */isSubMesh); + if ( hyp->_is_nil() && isSubMesh ) + hyp = SMESHGUI::GetSMESHGen()->GetHypothesisParameterValues( aHypType.toLatin1().data(), + aServerLib.toLatin1().data(), + aMeshVar, + aGeomVar, + /*byMesh = */false); + return hyp; } //================================================================================