From: eap Date: Wed, 7 Nov 2012 08:30:07 +0000 (+0000) Subject: 0021942: [CEA 700] Behavior of the Mesh.Triangle(algo=smesh.NETGEN) command X-Git-Tag: V6_6_0b1~17 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0e8ed41adbfcadd15e02863bb46cbf9a856422c4;p=modules%2Fsmesh.git 0021942: [CEA 700] Behavior of the Mesh.Triangle(algo=smesh.NETGEN) command In readMesh(), if there are incompatible algos assigned, one of which is thus ignored by Compute(), make the not ignored algo be present in the dialog instead of the ignored one --- diff --git a/src/SMESHGUI/SMESHGUI_MeshOp.cxx b/src/SMESHGUI/SMESHGUI_MeshOp.cxx index 7a494110a..df085305b 100644 --- a/src/SMESHGUI/SMESHGUI_MeshOp.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshOp.cxx @@ -1965,10 +1965,9 @@ SMESH::SMESH_Hypothesis_var SMESHGUI_MeshOp::getAlgo( const int theDim ) //================================================================================ /*! - * \brief Reads parameters of edited mesh and assigns them to the dialog + * \brief Reads parameters of an edited mesh and assigns them to the dialog * - * Reads parameters of edited mesh and assigns them to the dialog (called when - * mesh is edited only) + * Called when mesh is edited only. */ //================================================================================ void SMESHGUI_MeshOp::readMesh() @@ -2005,8 +2004,8 @@ void SMESHGUI_MeshOp::readMesh() // Get hypotheses and algorithms assigned to the mesh/sub-mesh QStringList anExisting; - const int aDim = ( myIsOnGeometry ) ? SMESH::DIM_0D : SMESH::DIM_3D; - for ( int dim = aDim; dim <= SMESH::DIM_3D; dim++ ) + const int lastDim = ( myIsOnGeometry ) ? SMESH::DIM_0D : SMESH::DIM_3D; + for ( int dim = SMESH::DIM_3D; dim >= lastDim; --dim ) { // get algorithm existingHyps( dim, Algo, pObj, anExisting, myObjHyps[ dim ][ Algo ] ); @@ -2030,7 +2029,7 @@ void SMESHGUI_MeshOp::readMesh() // get hypotheses bool hypWithoutAlgo = false; - for ( int dim = aDim; dim <= SMESH::DIM_3D; dim++ ) + for ( int dim = SMESH::DIM_3D; dim >= lastDim; --dim ) { for ( int hypType = MainHyp; hypType <= AddHyp; hypType++ ) {