]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
patch for export Telemac in current/home folder
authorasl <asl@opencascade.com>
Thu, 24 Nov 2016 12:47:48 +0000 (15:47 +0300)
committerasl <asl@opencascade.com>
Thu, 24 Nov 2016 12:47:48 +0000 (15:47 +0300)
src/HYDROData/HYDROData_LandCoverMap.cxx

index c9788e204acafce3ed71e35c1a2a7e997280dcb7..046e61fd8126f4142eae4f4e3d7e5cf1d3ac81a0 100644 (file)
@@ -421,15 +421,18 @@ bool HYDROData_LandCoverMap::ExportTelemac( const QString& theFileName,
   QFile aFile( theFileName );
   if( !aFile.open( QFile::WriteOnly | QFile::Text ) )
   {
-    QString homeDirPath = QDir::homePath();
-    aFile.setFileName(homeDirPath);
+    QString homeFilePath = QDir::home().absoluteFilePath( theFileName );
+    aFile.setFileName(homeFilePath);
     if (aFile.open( QFile::WriteOnly | QFile::Text ) )
-      statMessage = "Telemac file have been exported to the home directory:" + homeDirPath;
+      statMessage = "Telemac file have been exported to the home directory: " + homeFilePath;
     else
       return false;
   }
   else
-    statMessage = "Telemac file have been exported to the current directory";
+  {
+    QString absFilePath = QDir::current().absoluteFilePath( theFileName );
+    statMessage = "Telemac file have been exported to the current directory: " + absFilePath;
+  }
 
   QTextStream aStream( &aFile );
   aStream << "# nodes\n";