]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Fix of 0022477: EDF GEOM [XAO] : The .xao extension is not added automatically
authorakl <akl@opencascade.com>
Wed, 12 Feb 2014 13:53:03 +0000 (17:53 +0400)
committerakl <akl@opencascade.com>
Wed, 12 Feb 2014 13:53:03 +0000 (17:53 +0400)
src/GEOMGUI/GEOM_msg_en.ts
src/GEOMGUI/GEOM_msg_fr.ts
src/ImportExportGUI/ImportExportGUI_ExportXAODlg.cxx
src/ImportExportGUI/ImportExportGUI_ImportXAODlg.cxx

index 8aade3c3db7d9dc00c4e469aa40847cdd6fea237..d57c18ef59f289ac1466fbe6043b39b189dfbbf2 100644 (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>
index ee3e881d805c3cee5f581c500a213986108cba15..25f857109e95f6dcbd20d3c26e93329600936627 100644 (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>
index 3d14586cc4a3349e8e8ce5a268c49a252956379c..8d47fc6fe90a2a2a7f3c8a2ba0b971b5a71f4c97 100644 (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 );
 }
 
 //=================================================================================
index ba5d065ee4b20b976af910e03c9a2d32ba906b82..b2365d4d7f37864fb6e2188e2db9d582a5e98a67 100644 (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 );
 }
 
 //=================================================================================