]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Fix for PAL6826.
authormzn <mzn@opencascade.com>
Fri, 21 Jul 2006 10:13:59 +0000 (10:13 +0000)
committermzn <mzn@opencascade.com>
Fri, 21 Jul 2006 10:13:59 +0000 (10:13 +0000)
src/GEOMToolsGUI/GEOMToolsGUI.cxx

index fb6a99d7dd79f97936b3cf4ad5288169319cddc5..96fe7ff019f67a35be0c8604ce36628e3a47cf5a 100644 (file)
@@ -450,6 +450,17 @@ bool GEOMToolsGUI::Import()
 
   QString fileName = getFileName(app->desktop(), "", aMap,
                                  tr("GEOM_MEN_IMPORT"), true, fileType);
+
+  if (fileType.isEmpty() )
+    {
+      // Trying to detect file type
+      QFileInfo aFileInfo( fileName );
+      QString aPossibleType = (aFileInfo.extension(false)).upper() ;
+      
+      if ( (aMap.values()).contains(aPossibleType) )
+       fileType = aPossibleType;
+    }
+
   if (fileName.isEmpty() || fileType.isEmpty())
     return false;