Salome HOME
Bug #490: batch mode error.
[modules/hydro.git] / src / HYDROData / HYDROData_Document.cxx
index 86d16b089d2686eb1e724daf1a5b521cef3e8d19..3568066a333787753c5577adcae0b68ca70ba34c 100644 (file)
@@ -205,6 +205,8 @@ bool HYDROData_Document::DumpToPython( const QString& theFileName,
   // Dump the local CS data to Python 
   UpdateLCSFields();
   QString aLCS = QString( "%1.SetLocalCS( %2, %3 )" ).arg( GetDocPyName() ).arg( myLX ).arg( myLY );
+  if( theIsMultiFile )
+    aLCS.prepend( "  " );
   HYDROData_Tool::WriteStringsToFile( aFile, QStringList() << aLCS );
 
   // Dump all model objects to Python script
@@ -265,6 +267,7 @@ QStringList HYDROData_Document::DumpToPython( MapOfTreatedObjects& theTreatedObj
 
   if ( theIsMultiFile )
   {
+    aResScript << QString( "import salome" );
     aResScript << QString( "" );
     aResScript << QString( "def RebuildData( theStudy ):" );
     aResScript << QString( "  %1 = HYDROData_Document.Document( theStudy._get_StudyId() );" ).arg( aDocName );