From 67100410d9f3f55f71ca7538db2cd820268ed8ec Mon Sep 17 00:00:00 2001 From: mzn Date: Fri, 21 Jul 2006 10:13:59 +0000 Subject: [PATCH] Fix for PAL6826. --- src/GEOMToolsGUI/GEOMToolsGUI.cxx | 11 +++++++++++ 1 file changed, 11 insertions(+) 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; -- 2.39.2