From: mzn Date: Fri, 21 Jul 2006 10:13:59 +0000 (+0000) Subject: Fix for PAL6826. X-Git-Tag: For_OCT_611~15 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=67100410d9f3f55f71ca7538db2cd820268ed8ec;p=modules%2Fgeom.git Fix for PAL6826. --- diff --git a/src/GEOMToolsGUI/GEOMToolsGUI.cxx b/src/GEOMToolsGUI/GEOMToolsGUI.cxx index fb6a99d7d..96fe7ff01 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI.cxx @@ -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;