From: akl Date: Wed, 12 Feb 2014 13:53:03 +0000 (+0400) Subject: Fix of 0022477: EDF GEOM [XAO] : The .xao extension is not added automatically X-Git-Tag: V7_4_0a1~29 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b93a22e62fef9e7eefdf2c554d5206ebfcdf7fec;p=modules%2Fgeom.git Fix of 0022477: EDF GEOM [XAO] : The .xao extension is not added automatically --- diff --git a/src/GEOMGUI/GEOM_msg_en.ts b/src/GEOMGUI/GEOM_msg_en.ts index 8aade3c3d..d57c18ef5 100644 --- a/src/GEOMGUI/GEOM_msg_en.ts +++ b/src/GEOMGUI/GEOM_msg_en.ts @@ -5097,6 +5097,10 @@ Ignoring units will cause model scaling (as dimensions are supposed to be specif GEOM_IMPORTEXPORT_204 Export XAO + + GEOM_SELECT_IMPORT_XAO + Import from XAO + GEOM_SELECT_EXPORT_XAO Export to XAO diff --git a/src/GEOMGUI/GEOM_msg_fr.ts b/src/GEOMGUI/GEOM_msg_fr.ts index ee3e881d8..25f857109 100644 --- a/src/GEOMGUI/GEOM_msg_fr.ts +++ b/src/GEOMGUI/GEOM_msg_fr.ts @@ -5097,6 +5097,10 @@ le paramètre '%1' aux préférences du module Géométrie.GEOM_IMPORTEXPORT_204 Export XAO + + GEOM_SELECT_IMPORT_XAO + Import from XAO + GEOM_SELECT_EXPORT_XAO Export XAO diff --git a/src/ImportExportGUI/ImportExportGUI_ExportXAODlg.cxx b/src/ImportExportGUI/ImportExportGUI_ExportXAODlg.cxx index 3d14586cc..8d47fc6fe 100644 --- a/src/ImportExportGUI/ImportExportGUI_ExportXAODlg.cxx +++ b/src/ImportExportGUI/ImportExportGUI_ExportXAODlg.cxx @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -339,17 +340,11 @@ void ImportExportGUI_ExportXAODlg::SetEditCurrentArgument() //================================================================================= void ImportExportGUI_ExportXAODlg::btnFileSelectClicked() { - QFileDialog dlg(this, tr("GEOM_SELECT_EXPORT_XAO") ); - dlg.setLabelText( QFileDialog::Accept, tr("EXPORT_DLG_ACCEPT") ); - dlg.setNameFilter( tr("XAO_FILES") ); - if (dlg.exec()) - { - QStringList selFiles = dlg.selectedFiles(); - if (selFiles.length() > 0 && !selFiles[0].isEmpty()) - { - ledFileName->setText(selFiles[0]); - } - } + QString file = SUIT_FileDlg::getFileName(this, ledFileName->text(), + tr("XAO_FILES"), + tr("GEOM_SELECT_EXPORT_XAO"), false); + if ( !file.isEmpty() ) + ledFileName->setText( file ); } //================================================================================= diff --git a/src/ImportExportGUI/ImportExportGUI_ImportXAODlg.cxx b/src/ImportExportGUI/ImportExportGUI_ImportXAODlg.cxx index ba5d065ee..b2365d4d7 100644 --- a/src/ImportExportGUI/ImportExportGUI_ImportXAODlg.cxx +++ b/src/ImportExportGUI/ImportExportGUI_ImportXAODlg.cxx @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -191,12 +192,11 @@ bool ImportExportGUI_ImportXAODlg::ClickOnApply() //================================================================================= void ImportExportGUI_ImportXAODlg::btnFileSelectClicked() { - QString selFile = QFileDialog::getOpenFileName(this, tr("GEOM_SELECT_EXPORT_XAO"), - QString(), tr("XAO_FILES")); - if (!selFile.isEmpty()) - { - ledFileName->setText(selFile); - } + QString file = SUIT_FileDlg::getFileName(this, ledFileName->text(), + tr("XAO_FILES"), + tr("GEOM_SELECT_IMPORT_XAO")); + if ( !file.isEmpty() ) + ledFileName->setText( file ); } //=================================================================================