0021824: EDF 2364 SMESH : Unknown exception when dumping a Study

fix a bug in DumpPython()
This commit is contained in:
eap 2012-08-30 08:12:19 +00:00
parent 880391e583
commit 9e8a1e664f

View File

@ -674,12 +674,13 @@ TCollection_AsciiString GEOM_Engine::DumpPython(int theDocID,
// add function description before dump // add function description before dump
if (!aCurScript.IsEmpty()) 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 // avoid repeated SubShape...() command at the end
if (aFuncScript.Location( aCurScript, if (aFuncScript.Location( aCurScript,
aFuncScript.Length() - aCurScript.Length(), aFuncScript.Length() - aCurScript.Length(),
aFuncScript.Length())) aFuncScript.Length()))
continue; continue; // aCurScript is already at the end of aFuncScript
aFuncScript += aCurScript; aFuncScript += aCurScript;
} }
if (isDumpCollected ) { if (isDumpCollected ) {