From e4b8993befe2b65cf302ee8e56114d1734c600b4 Mon Sep 17 00:00:00 2001 From: isn Date: Mon, 29 Jun 2015 13:56:40 +0300 Subject: [PATCH] #refs 608 ::remarks --- src/HYDROData/HYDROData_ShapeFile.cxx | 9 +++++++-- src/HYDROGUI/resources/HYDROGUI_msg_en.ts | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) 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 -- 2.39.2