From 68d2136e8c45b3e2294500a4e1f81d8aa2ef38da Mon Sep 17 00:00:00 2001 From: fps Date: Fri, 15 Nov 2013 15:21:11 +0000 Subject: [PATCH] Change name of button in export file selection dialog --- src/GEOMGUI/GEOM_msg_en.ts | 4 ++++ src/GEOMGUI/GEOM_msg_fr.ts | 4 ++++ .../ImportExportGUI_ExportXAODlg.cxx | 13 +++++++++---- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/GEOMGUI/GEOM_msg_en.ts b/src/GEOMGUI/GEOM_msg_en.ts index be71cff15..b861fe2d9 100644 --- a/src/GEOMGUI/GEOM_msg_en.ts +++ b/src/GEOMGUI/GEOM_msg_en.ts @@ -6461,6 +6461,10 @@ Do you want to create new material? GEOM_EXPORTXAO_LFIELDS Fields + + EXPORT_DLG_ACCEPT + OK + ImportExportGUI_ImportXAODlg diff --git a/src/GEOMGUI/GEOM_msg_fr.ts b/src/GEOMGUI/GEOM_msg_fr.ts index f356408fd..a5cb15cea 100644 --- a/src/GEOMGUI/GEOM_msg_fr.ts +++ b/src/GEOMGUI/GEOM_msg_fr.ts @@ -6414,6 +6414,10 @@ Voulez-vous en créer un nouveau ? GEOM_EXPORTXAO_LFIELDS Champs + + EXPORT_DLG_ACCEPT + OK + ImportExportGUI_ImportXAODlg diff --git a/src/ImportExportGUI/ImportExportGUI_ExportXAODlg.cxx b/src/ImportExportGUI/ImportExportGUI_ExportXAODlg.cxx index 4cf4408b8..1f232009d 100644 --- a/src/ImportExportGUI/ImportExportGUI_ExportXAODlg.cxx +++ b/src/ImportExportGUI/ImportExportGUI_ExportXAODlg.cxx @@ -337,11 +337,16 @@ void ImportExportGUI_ExportXAODlg::SetEditCurrentArgument() //================================================================================= void ImportExportGUI_ExportXAODlg::btnFileSelectClicked() { - QString selFile = QFileDialog::getSaveFileName(this, tr("GEOM_SELECT_EXPORT_XAO"), - QString(), tr("XAO_FILES")); - if (!selFile.isEmpty()) + QFileDialog dlg(this, tr("GEOM_SELECT_EXPORT_XAO") ); + dlg.setLabelText( QFileDialog::Accept, tr("EXPORT_DLG_ACCEPT") ); + dlg.setNameFilter( tr("XAO_FILES") ); + if (dlg.exec()) { - ledFileName->setText(selFile); + QStringList selFiles = dlg.selectedFiles(); + if (selFiles.length() > 0 && !selFiles[0].isEmpty()) + { + ledFileName->setText(selFiles[0]); + } } } -- 2.39.2