]> git.lyx.org Git - lyx.git/commitdiff
Fix bug #5543: InsetInfo gives wrong result for textclasses.
authorVincent van Ravesteijn <vfr@lyx.org>
Thu, 22 Apr 2010 19:36:03 +0000 (19:36 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Thu, 22 Apr 2010 19:36:03 +0000 (19:36 +0000)
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.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34268 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/InsetInfo.cpp

index 317a9539c8094f814b0c84c09c9af65711a9da6f..a15270fa3a6acf585a72cdaa22fa5860493ebcb8 100644 (file)
@@ -323,9 +323,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: {