]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
NPAL16151: EDF445: Import/Export BREP by default.
authorjfa <jfa@opencascade.com>
Tue, 5 Jun 2007 12:33:21 +0000 (12:33 +0000)
committerjfa <jfa@opencascade.com>
Tue, 5 Jun 2007 12:33:21 +0000 (12:33 +0000)
src/GEOMToolsGUI/GEOMToolsGUI.cxx

index 39022be14fe8b2d8cdf4d9877ce83a57955e67da..baacd7c2704c0fe497b2f892832a8b5cfb7d54e1 100644 (file)
@@ -78,9 +78,15 @@ static QString getFileName( QWidget*           parent,
 {
   static QString lastUsedFilter;
   QStringList filters;
-  for ( FilterMap::const_iterator it = filterMap.begin(); it != filterMap.end(); ++it )
+  QString aBrepFilter;
+  for ( FilterMap::const_iterator it = filterMap.begin(); it != filterMap.end(); ++it ) {
     filters.push_back( it.key() );
 
+    if (it.key().contains("BREP", false)) {
+      aBrepFilter = it.key();
+    }
+  }
+
   SUIT_FileDlg* fd = new SUIT_FileDlg( parent, open, true, true );
   if ( !caption.isEmpty() )
     fd->setCaption( caption );
@@ -88,10 +94,15 @@ static QString getFileName( QWidget*           parent,
   if ( !initial.isEmpty() )
     fd->setSelection( initial );
 
+  fd->setFilters( filters );
+
   if ( !lastUsedFilter.isEmpty() && filterMap.contains( lastUsedFilter ) )
     fd->setSelectedFilter( lastUsedFilter );
-
-  fd->setFilters( filters );
+  else {
+    if (!aBrepFilter.isEmpty()) {
+      fd->setSelectedFilter(aBrepFilter);
+    }
+  }
 
   fd->exec();
   QString filename = fd->selectedFile();