]> git.lyx.org Git - features.git/commitdiff
Fix LFUN_LANGUAGE bug due to Font/Language separation (r21240):
authorDov Feldstern <dov@lyx.org>
Tue, 30 Oct 2007 22:55:33 +0000 (22:55 +0000)
committerDov Feldstern <dov@lyx.org>
Tue, 30 Oct 2007 22:55:33 +0000 (22:55 +0000)
the LFUN had stopped working, because since language is no longer part of the
font, changes to the language were no longer being registered in the fontInfo,
and so we were wrongly under the impression that nothing had been changed.

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

src/Text2.cpp

index 7768439e5bfc4f100e2a58822f69a787dc7fa2a2..2a6abbfb39566c6cc997e9e820d313f1fffe9b50 100644 (file)
@@ -395,7 +395,8 @@ void Text::toggleFree(Cursor & cur, Font const & font, bool toggleall)
 {
        BOOST_ASSERT(this == cur.text());
        // If the mask is completely neutral, tell user
-       if (font.fontInfo() == ignore_font) {
+       if (font.fontInfo() == ignore_font && 
+               (font.language() == 0 || font.language() == ignore_language)) {
                // Could only happen with user style
                cur.message(_("No font change defined."));
                return;