From: jfa Date: Mon, 1 Jul 2013 06:40:44 +0000 (+0000) Subject: Mantis issue 0022237: Study dump produces a Python code containing syntax errors X-Git-Tag: BR_hydro_v_0_3_1~167 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5f7358def184aa747df883c306d3ef07a7816846;p=modules%2Fgeom.git Mantis issue 0022237: Study dump produces a Python code containing syntax errors --- diff --git a/src/GEOMImpl/GEOMImpl_IBlocksOperations.cxx b/src/GEOMImpl/GEOMImpl_IBlocksOperations.cxx index 369a924fb..6d1c2d83f 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(); + Handle(GEOM_Function) aFunction = aResult->GetLastFunction(); // Make a Python command - GEOM::TPythonDump(aFunction, /*append=*/true) - << aResult << " = geompy.GetVertexNearPoint(" - << theShape << ", " << thePoint << ")"; + GEOM::TPythonDump(aFunction) << aResult << " = geompy.GetVertexNearPoint(" + << theShape << ", " << thePoint << ")"; SetErrorCode(OK); return aResult;