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) { if (--myCounter == 0) {
TCollection_AsciiString aDescr; TCollection_AsciiString aDescr;
if ( myAppend ) if ( myAppend ) {
aDescr = myFunction->GetDescription() + "\n\t"; aDescr = myFunction->GetDescription();
if ( !aDescr.IsEmpty() ) aDescr += "\n\t";
}
std::string aString = myStream.str(); std::string aString = myStream.str();
aDescr += (char *)aString.c_str(); aDescr += (char *)aString.c_str();
myFunction->SetDescription( aDescr ); myFunction->SetDescription( aDescr );