From: Richard Heck Date: Wed, 18 Mar 2009 18:47:42 +0000 (+0000) Subject: Fix bug 1492. X-Git-Tag: 2.0.0~7052 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=22e1e85c8ed9d191e92f17ae4e04c0655f2e7416;p=features.git Fix bug 1492. 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 --- diff --git a/src/frontends/qt4/GuiDocument.cpp b/src/frontends/qt4/GuiDocument.cpp index c1be148ac1..493ac1a272 100644 --- a/src/frontends/qt4/GuiDocument.cpp +++ b/src/frontends/qt4/GuiDocument.cpp @@ -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); } };