From: isn Date: Mon, 29 Jun 2015 10:56:40 +0000 (+0300) Subject: #refs 608 ::remarks X-Git-Tag: v1.4.2~16 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e4b8993befe2b65cf302ee8e56114d1734c600b4;p=modules%2Fhydro.git #refs 608 ::remarks --- diff --git a/src/HYDROData/HYDROData_ShapeFile.cxx b/src/HYDROData/HYDROData_ShapeFile.cxx index fa4fe090..70e657ba 100644 --- a/src/HYDROData/HYDROData_ShapeFile.cxx +++ b/src/HYDROData/HYDROData_ShapeFile.cxx @@ -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 ) diff --git a/src/HYDROGUI/resources/HYDROGUI_msg_en.ts b/src/HYDROGUI/resources/HYDROGUI_msg_en.ts index 0a470c97..e71fabb1 100644 --- a/src/HYDROGUI/resources/HYDROGUI_msg_en.ts +++ b/src/HYDROGUI/resources/HYDROGUI_msg_en.ts @@ -2345,7 +2345,7 @@ file cannot be correctly imported for an Obstacle definition. CANNOT_BE_EXPORTED - The next entities cannot be exported: + Following entities cannot be exported: ERROR_POLYLINES_OF_DIFF_KIND