From 5476768d0e14585d2d59856f31f86f3cac04f3cc Mon Sep 17 00:00:00 2001 From: jfa Date: Mon, 1 Jul 2013 06:39:49 +0000 Subject: [PATCH] Mantis issue 0022237: Study dump produces a Python code containing syntax errors --- src/GEOMImpl/GEOMImpl_IBlocksOperations.cxx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/GEOMImpl/GEOMImpl_IBlocksOperations.cxx b/src/GEOMImpl/GEOMImpl_IBlocksOperations.cxx index efb69f42c..3640533b6 100644 --- a/src/GEOMImpl/GEOMImpl_IBlocksOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IBlocksOperations.cxx @@ -634,13 +634,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; -- 2.30.2