From: eap Date: Thu, 30 Aug 2012 08:12:19 +0000 (+0000) Subject: 0021824: EDF 2364 SMESH : Unknown exception when dumping a Study X-Git-Tag: V6_6_0a1~41 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9e8a1e664f29ccd5960cb2fe2f5528001adfba24;p=modules%2Fgeom.git 0021824: EDF 2364 SMESH : Unknown exception when dumping a Study fix a bug in DumpPython() --- 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 ) {