From: jrt Date: Fri, 5 Mar 2004 12:55:16 +0000 (+0000) Subject: One unwanted command was added to the mesh log. It is now fixed. X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7c825744f83575781b213182e7e4848d0fd5be77;p=modules%2Fsmesh.git One unwanted command was added to the mesh log. It is now fixed. --- diff --git a/src/SMESH_I/SMESH_Mesh_i.cxx b/src/SMESH_I/SMESH_Mesh_i.cxx index 76b97fbfe..9f1f90099 100644 --- a/src/SMESH_I/SMESH_Mesh_i.cxx +++ b/src/SMESH_I/SMESH_Mesh_i.cxx @@ -231,7 +231,8 @@ SMESH::SMESH_subMesh_ptr SMESH_Mesh_i::GetElementsOnShape(GEOM:: * Translate the UpdateAll SMESHDS_Command to a set of SMESH::log_command. * As the input log need to be resized, it is realocated. * @param logBlock The log where to insert created commands - * @param index The place where to insert created commands in log + * @param index The place where to insert created commands in log. It is updated + * with the place to put new elements. * @return The realocated and resized log. * @TODO Add support for other type of elements */ @@ -239,8 +240,8 @@ SMESH::log_array_var SMESH_Mesh_i:: createUpdateAllCommand(SMESH::log_array_var log, int * index) { MESSAGE("SMESH_Mesh_i::createUpdateAllCommand"); - SMESH::log_array_var aLog=new SMESH::log_array(log->length()+4); - aLog->length(log->length()+4); + SMESH::log_array_var aLog=new SMESH::log_array(log->length()+3); + aLog->length(log->length()+3); for(int i=0;i<*index;i++) { @@ -298,7 +299,7 @@ SMESH::log_array_var SMESH_Mesh_i:: aLog[id].number*4, triasIndices); - (*index)+=4; + (*index)=id; return aLog; } @@ -341,7 +342,7 @@ SMESH::log_array * SMESH_Mesh_i::GetLog(CORBA::Boolean clearAfterGet) aLog[indexLog].commandType = comType; if(comType==SMESHDS_UpdateAll) { - aLog=createUpdateAllCommand(aLog, &indexLog); + aLog=createUpdateAllCommand(aLog, &indexLog); } else { @@ -361,7 +362,7 @@ SMESH::log_array * SMESH_Mesh_i::GetLog(CORBA::Boolean clearAfterGet) ii++; } indexLog++; - } + } its++; } if (clearAfterGet) _impl->ClearLog();