From: eap Date: Wed, 20 Jun 2012 09:41:46 +0000 (+0000) Subject: 0021672: [CEA 565] Dump Study from script X-Git-Tag: V6_6_0a1~111 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ac1a5b9175fdb4440f4984b79859e79f12821b36;p=modules%2Fgeom.git 0021672: [CEA 565] Dump Study from script Avoid empty lines in the script due to appending to an empty command --- diff --git a/src/GEOM/GEOM_PythonDump.cxx b/src/GEOM/GEOM_PythonDump.cxx index 97eae0cef..70022fc99 100644 --- a/src/GEOM/GEOM_PythonDump.cxx +++ b/src/GEOM/GEOM_PythonDump.cxx @@ -44,8 +44,10 @@ namespace GEOM { if (--myCounter == 0) { TCollection_AsciiString aDescr; - if ( myAppend ) - aDescr = myFunction->GetDescription() + "\n\t"; + if ( myAppend ) { + aDescr = myFunction->GetDescription(); + if ( !aDescr.IsEmpty() ) aDescr += "\n\t"; + } std::string aString = myStream.str(); aDescr += (char *)aString.c_str(); myFunction->SetDescription( aDescr );