]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
#refs 608 ::remarks
authorisn <isn@opencascade.com>
Mon, 29 Jun 2015 10:56:40 +0000 (13:56 +0300)
committerisn <isn@opencascade.com>
Mon, 29 Jun 2015 10:56:40 +0000 (13:56 +0300)
src/HYDROData/HYDROData_ShapeFile.cxx
src/HYDROGUI/resources/HYDROGUI_msg_en.ts

index fa4fe090a7db8c79c6ac289cc8d80b00c8d1dbc5..70e657ba7e77c642431242945e9a7db096fbd300 100644 (file)
@@ -90,8 +90,13 @@ void HYDROData_ShapeFile::Export(const QString& aFileName,
       if (WriteObjectLC(hSHPHandle, aLCSeq(i)) != 1)
         aNonExpList.append(aLCSeq(i)->GetName());
   }
-  SHPClose( hSHPHandle );
-
+  if (hSHPHandle->nRecords > 0)
+    SHPClose( hSHPHandle );
+  else
+  {
+    SHPClose( hSHPHandle );
+    remove (aFileName.toStdString().c_str());
+  }
 }
 
 int HYDROData_ShapeFile::WriteObjectPolyXY(SHPHandle theShpHandle, Handle_HYDROData_PolylineXY thePoly )
index 0a470c97d1be4def5438f0f4a26f39a620ea1fea..e71fabb18c0341ab39f9686bdd9604bed65cca03 100644 (file)
@@ -2345,7 +2345,7 @@ file cannot be correctly imported for an Obstacle definition.</translation>
     </message>
     <message>
       <source>CANNOT_BE_EXPORTED</source>
-      <translation>The next entities cannot be exported:</translation>
+      <translation>Following entities cannot be exported:</translation>
     </message>
     <message>
       <source>ERROR_POLYLINES_OF_DIFF_KIND</source>