Salome HOME
getting nb of intersections (non-gui) + add of profiles of stream to tree
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_ExportFileOp.cxx
index b256ba4f28d70a4b9376bde57cff4aef3c63ecd7..76cbf0dc732f91e297675c0ba3a0890dd2b056be 100644 (file)
@@ -107,14 +107,14 @@ void HYDROGUI_ExportFileOp::startOperation()
     {
       QStringList aNonExpList;
       HYDROData_ShapeFile anExporter;
+      Handle_HYDROData_Document aDoc = HYDROData_Document::Document( application()->activeStudy()->id() );
       if (!aPolyXYSeq.IsEmpty() || !aPolyXYSeq.IsEmpty())
         //Export polylines
-        anExporter.Export(aFileName, aPolyXYSeq, aPoly3DSeq, aNonExpList);
+        anExporter.Export(aDoc, aFileName, aPolyXYSeq, aPoly3DSeq, aNonExpList);
       else
       {
         //Export polygons
         //Extract all attribute names from all strickler tables
-        Handle_HYDROData_Document aDoc = HYDROData_Document::Document( application()->activeStudy()->id() );
         QSet<QString> anAttrNames;
         //use QSet to store attribute names. Yet it's not so good if the document contains two strickler types
         //with the same name
@@ -154,7 +154,7 @@ void HYDROGUI_ExportFileOp::startOperation()
           }
 
           //export shape-data
-          anExporter.Export(aFileName, aLCM, aNonExpList, false, !IsLinear, aDlg.getDeflValue());
+          anExporter.Export(aDoc, aFileName, aLCM, aNonExpList, false, !IsLinear, aDlg.getDeflValue());
           QString aDBFFileName = aFileName.replace( ".shp", ".dbf", Qt::CaseInsensitive);
           //Even if attribute-checkbox is unchecked, the .dbf-file should be removed. 
           //otherwise it may be used with wrong .shp-file. This is an incorrect behaivor.