From 9e8a1e664f29ccd5960cb2fe2f5528001adfba24 Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 30 Aug 2012 08:12:19 +0000 Subject: [PATCH] 0021824: EDF 2364 SMESH : Unknown exception when dumping a Study fix a bug in DumpPython() --- src/GEOM/GEOM_Engine.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/GEOM/GEOM_Engine.cxx b/src/GEOM/GEOM_Engine.cxx index 6efcaf7e0..dee9d3b54 100644 --- a/src/GEOM/GEOM_Engine.cxx +++ b/src/GEOM/GEOM_Engine.cxx @@ -674,12 +674,13 @@ TCollection_AsciiString GEOM_Engine::DumpPython(int theDocID, // add function description before dump if (!aCurScript.IsEmpty()) { - if ( aFunction->GetDriverGUID() == GEOM_Object::GetSubShapeID() ) + if ( aFunction->GetDriverGUID() == GEOM_Object::GetSubShapeID() && + aFuncScript.Length() > aCurScript.Length() ) // avoid repeated SubShape...() command at the end if (aFuncScript.Location( aCurScript, aFuncScript.Length() - aCurScript.Length(), aFuncScript.Length())) - continue; + continue; // aCurScript is already at the end of aFuncScript aFuncScript += aCurScript; } if (isDumpCollected ) { -- 2.39.2