else
{
QString aFileName = SUIT_FileDlg::getFileName( module()->getApp()->desktop(), "", aFilter, tr( "EXPORT_POLYLINE" ), false );
- SHPHandle hSHPHandle;
- if (!aPolyXYSeq.IsEmpty() && aPoly3DSeq.IsEmpty())
+ if (!aFileName.isEmpty())
{
- hSHPHandle = SHPCreate( aFileName.toAscii().data(), SHPT_ARC );
- for (int i = 1; i <= aPolyXYSeq.Size(); i++)
- WriteObjectPolyXY(hSHPHandle, aPolyXYSeq(i));
+ SHPHandle hSHPHandle;
+ if (!aPolyXYSeq.IsEmpty() && aPoly3DSeq.IsEmpty())
+ {
+ hSHPHandle = SHPCreate( aFileName.toAscii().data(), SHPT_ARC );
+ for (int i = 1; i <= aPolyXYSeq.Size(); i++)
+ WriteObjectPolyXY(hSHPHandle, aPolyXYSeq(i));
+ }
+ else if (aPolyXYSeq.IsEmpty() && !aPoly3DSeq.IsEmpty())
+ {
+ hSHPHandle = SHPCreate( aFileName.toAscii().data(), SHPT_ARCZ );
+ for (int i = 1; i <= aPoly3DSeq.Size(); i++)
+ WriteObjectPoly3D(hSHPHandle, aPoly3DSeq(i));
+ }
+ SHPClose( hSHPHandle );
+ commit();
}
- else if (aPolyXYSeq.IsEmpty() && !aPoly3DSeq.IsEmpty())
- {
- hSHPHandle = SHPCreate( aFileName.toAscii().data(), SHPT_ARCZ );
- for (int i = 1; i <= aPoly3DSeq.Size(); i++)
- WriteObjectPoly3D(hSHPHandle, aPoly3DSeq(i));
- }
- SHPClose( hSHPHandle );
+ else
+ abort();
}
- commit();
}
void HYDROGUI_ExportFileOp::WriteObjectPolyXY(SHPHandle theShpHandle, Handle_HYDROData_PolylineXY thePoly )