branch: Fix bug #5543: InsetInfo? gives wrong result for textclasses.

InsetInfo? only returned whether a layout file was available for a class, not whether the LaTeX document class was available.

This might be caused by the maybe misleading name of the "LayoutFileList::haveClass()" function.

see r34268.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@34306 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2010-04-27 12:43:46 +00:00
parent 522b40d492
commit 0e36db41eb
2 changed files with 8 additions and 1 deletions

View File

@ -321,9 +321,14 @@ void InsetInfo::updateInfo()
// check in packages.lst
setText(LaTeXFeatures::isAvailable(name_) ? _("yes") : _("no"));
break;
case TEXTCLASS_INFO: {
// name_ is the class name
setText(LayoutFileList::get().haveClass(name_) ? _("yes") : _("no"));
LayoutFileList const & list = LayoutFileList::get();
bool available = false;
if (list.haveClass(name_))
available = list[name_].isTeXClassAvailable();
setText(available ? _("yes") : _("no"));
break;
}
case MENU_INFO: {

View File

@ -219,6 +219,8 @@ What's new
- Fix a stdlib assertion when deleting from TeX-code in math (bug 6489).
- Fix the use of lyxrc properties in InsetInfos (bug 6664).
- Fix the availability info for textclasses in InsetInfos (bug 5543).
- Resolve duplicate labels in mathed on pasting (bug 6218).