Salome HOME
LCM classification -> correct 2d to parametric 2d conversion of points
[modules/hydro.git] / src / HYDROData / HYDROData_LandCoverMap.cxx
index c9788e204acafce3ed71e35c1a2a7e997280dcb7..1ecf2586848aa701f27cc82bfbe4946822b6095e 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";
@@ -1292,7 +1295,7 @@ void HYDROData_LandCoverMap::ClassifyPoints( const std::vector<gp_XY>& thePoints
     else
     {
       std::set<QString>::const_iterator it;
-      std::vector<double> C1(SStr.size());
+      std::vector<double> C1;
       for (it = SStr.begin(); it != SStr.end(); ++it)
         C1.push_back(theTable->Get( *it, DefValue ));
       double Val;