File filters for InsetExternal were also missing a description.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39674 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Julien Rioux 2011-09-13 21:49:52 +00:00
parent 26568ce1e2
commit b794fc078a

View File

@ -623,7 +623,14 @@ static QStringList templateFilters(QString const & template_name)
external::Template const * const et_ptr = external::Template const * const et_ptr =
etm.getTemplateByName(fromqstr(template_name)); etm.getTemplateByName(fromqstr(template_name));
return fileFilters(et_ptr ? toqstr(et_ptr->fileRegExp) : QString()); string filter;
if (et_ptr && et_ptr->fileRegExp != "" && et_ptr->fileRegExp != "*") {
filter += et_ptr->guiName;
filter += " (";
filter += et_ptr->fileRegExp;
filter += ")";
}
return fileFilters(toqstr(filter));
} }