X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FHYDROGUI%2FHYDROGUI_ExportFileOp.cxx;h=b256ba4f28d70a4b9376bde57cff4aef3c63ecd7;hb=d37ac478f4055b8698aa200b8878af2cb6af5e45;hp=e4bb9ee959583d878ea8776ff90f1553773baa8a;hpb=64b1c61587fc5a975a06821be9e85e524d4dd2e4;p=modules%2Fhydro.git diff --git a/src/HYDROGUI/HYDROGUI_ExportFileOp.cxx b/src/HYDROGUI/HYDROGUI_ExportFileOp.cxx index e4bb9ee9..b256ba4f 100644 --- a/src/HYDROGUI/HYDROGUI_ExportFileOp.cxx +++ b/src/HYDROGUI/HYDROGUI_ExportFileOp.cxx @@ -131,10 +131,12 @@ void HYDROGUI_ExportFileOp::startOperation() else return; + QStringList SortedListOfAttr = anAttrNames.toList(); + SortedListOfAttr.sort(); // Handle_HYDROData_LandCoverMap aLCM = Handle(HYDROData_LandCoverMap)::DownCast( aSeq(1) ); bool IsLinear = aLCM->CheckLinear(); - HYDROGUI_ExportLandCoverMapDlg aDlg( module()->getApp()->desktop(), IsLinear, anAttrNames.toList()); + HYDROGUI_ExportLandCoverMapDlg aDlg( module()->getApp()->desktop(), IsLinear, SortedListOfAttr); if ( aDlg.exec() == HYDROGUI_ExportLandCoverMapDlg::Accepted ) { //In our case : aSeq.Size() == 1 @@ -157,7 +159,7 @@ void HYDROGUI_ExportFileOp::startOperation() //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. remove (aDBFFileName.toStdString().c_str()); - bool bToSaveAttrInfo = aDlg.getAttrCheckBoxState(); + bool bToSaveAttrInfo = aDlg.getAttrCheckBoxState() && !aDlg.getCurrentItem().isEmpty(); if (bToSaveAttrInfo) { //export attribute info