From: san Date: Fri, 19 Jul 2013 16:15:50 +0000 (+0000) Subject: 22237: Study dump produces a Python code containing syntax errors - merged from V6_7_BR X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2FBR_PPGP_BETA1;p=modules%2Fgeom.git 22237: Study dump produces a Python code containing syntax errors - merged from V6_7_BR --- diff --git a/src/GEOMImpl/GEOMImpl_IBlocksOperations.cxx b/src/GEOMImpl/GEOMImpl_IBlocksOperations.cxx index 42aaa4260..af912af92 100644 --- a/src/GEOMImpl/GEOMImpl_IBlocksOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IBlocksOperations.cxx @@ -635,13 +635,11 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::GetVertexNearPoint anArray->SetValue(1, anIndices.FindIndex(V)); aResult = GetEngine()->AddSubShape(theShape, anArray); - // The GetPoint() doesn't change object so no new function is required. - Handle(GEOM_Function) aFunction = theShape->GetLastFunction(); - - // Make a Python command - GEOM::TPythonDump(aFunction, /*append=*/true) - << aResult << " = geompy.GetVertexNearPoint(" - << theShape << ", " << thePoint << ")"; + Handle(GEOM_Function) aFunction = aResult->GetLastFunction(); + + // Make a Python command + GEOM::TPythonDump(aFunction) << aResult << " = geompy.GetVertexNearPoint(" + << theShape << ", " << thePoint << ")"; SetErrorCode(OK); return aResult;