From ac1a5b9175fdb4440f4984b79859e79f12821b36 Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 20 Jun 2012 09:41:46 +0000 Subject: [PATCH] 0021672: [CEA 565] Dump Study from script Avoid empty lines in the script due to appending to an empty command --- src/GEOM/GEOM_PythonDump.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 ); -- 2.39.2