Fix LFUN_LANGUAGE bug due to Font/Language separation (r21240):

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
This commit is contained in:
Dov Feldstern 2007-10-30 22:55:33 +00:00
parent 773e3d475f
commit 3e2af36af1

View 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;