0021672: [CEA 565] Dump Study from script

Avoid empty lines in the script due to appending to an empty command
This commit is contained in:
eap 2012-06-20 09:41:46 +00:00
parent c83df1846e
commit ac1a5b9175

View File

@ -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 );