]> git.lyx.org Git - features.git/commitdiff
Fix bug 1492.
authorRichard Heck <rgheck@comcast.net>
Wed, 18 Mar 2009 18:47:42 +0000 (18:47 +0000)
committerRichard Heck <rgheck@comcast.net>
Wed, 18 Mar 2009 18:47:42 +0000 (18:47 +0000)
Please let me know if this doesn't work right with various langauges, makes things worse, or what have you. I posted a note to devel about this but didn't get any response, so I'm guessing it's OK. If not, we'll revert it.

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

src/frontends/qt4/GuiDocument.cpp

index c1be148ac15612f71d45e1d6e0ab3cb96fc6b857..493ac1a2726bfef556e9d1f637d4ab995a45df8e 100644 (file)
@@ -168,10 +168,11 @@ public:
                //   2. Description (lexicographic)
                LayoutFile const & tc1 = LayoutFileList::get()[lhs];
                LayoutFile const & tc2 = LayoutFileList::get()[rhs];
+               int const rel = compare_no_case(
+                       translateIfPossible(from_utf8(tc1.description())),
+                       translateIfPossible(from_utf8(tc2.description())));
                return (tc1.isTeXClassAvailable() && !tc2.isTeXClassAvailable()) ||
-                       (tc1.isTeXClassAvailable() == tc2.isTeXClassAvailable() &&
-                        translateIfPossible(from_utf8(tc1.description()))
-                        < translateIfPossible(from_utf8(tc2.description())));
+                       (tc1.isTeXClassAvailable() == tc2.isTeXClassAvailable() && rel < 0);
        }
 };