Fix of 0022477: EDF GEOM [XAO] : The .xao extension is not added automatically

This commit is contained in:
akl 2014-02-12 17:53:03 +04:00
parent c66c69abfd
commit b93a22e62f
4 changed files with 20 additions and 17 deletions

View File

@ -5097,6 +5097,10 @@ Ignoring units will cause model scaling (as dimensions are supposed to be specif
<source>GEOM_IMPORTEXPORT_204</source>
<translation>Export XAO</translation>
</message>
<message>
<source>GEOM_SELECT_IMPORT_XAO</source>
<translation>Import from XAO</translation>
</message>
<message>
<source>GEOM_SELECT_EXPORT_XAO</source>
<translation>Export to XAO</translation>

View File

@ -5097,6 +5097,10 @@ le paramètre &apos;%1&apos; aux préférences du module Géométrie.</translati
<source>GEOM_IMPORTEXPORT_204</source>
<translation>Export XAO</translation>
</message>
<message>
<source>GEOM_SELECT_IMPORT_XAO</source>
<translation type="unfinished">Import from XAO</translation>
</message>
<message>
<source>GEOM_SELECT_EXPORT_XAO</source>
<translation>Export XAO</translation>

View File

@ -23,6 +23,7 @@
#include <SUIT_Session.h>
#include <SUIT_ResourceMgr.h>
#include <SUIT_OverrideCursor.h>
#include <SUIT_FileDlg.h>
#include <SalomeApp_Application.h>
#include <SalomeApp_Study.h>
#include <SalomeApp_Tools.h>
@ -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 );
}
//=================================================================================

View File

@ -24,6 +24,7 @@
#include <SUIT_Session.h>
#include <SUIT_ResourceMgr.h>
#include <SUIT_OverrideCursor.h>
#include <SUIT_FileDlg.h>
#include <SalomeApp_Application.h>
#include <SalomeApp_Study.h>
#include <LightApp_SelectionMgr.h>
@ -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 );
}
//=================================================================================