Only pick up qpt files in composer manager

This commit is contained in:
Nathan Woodrow 2015-11-13 20:00:46 +10:00
parent 31ac9be340
commit 860682c145

View File

@ -179,7 +179,10 @@ QMap<QString, QString> QgsComposerManager::templatesFromPath( QString path ) con
QFileInfoList::const_iterator infoIt = fileInfoList.constBegin();
for ( ; infoIt != fileInfoList.constEnd(); ++infoIt )
{
templateMap.insert( infoIt->baseName(), infoIt->absoluteFilePath() );
if ( infoIt->suffix().toLower() == "qpt" )
{
templateMap.insert( infoIt->baseName(), infoIt->absoluteFilePath() );
}
}
return templateMap;
}