Fix for PAL6826.

This commit is contained in:
mzn 2006-07-21 10:13:59 +00:00
parent c759def283
commit 67100410d9

View 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;