From: Martin Vermeer Date: Wed, 20 Apr 2005 12:31:34 +0000 (+0000) Subject: Fix the language problem in new lyxtexts, without causing X-Git-Tag: 1.6.10~14378 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=38cc5d1ebcd34289f1c7aea5c5c9442252842808;p=features.git Fix the language problem in new lyxtexts, without causing Helge's problem of not being able to change font on the fly. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9839 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/ChangeLog b/src/ChangeLog index 6e2e613260..ed6cd405b0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2005-04-19 Martin Vermeer + + * text3.C (dispatch): fix, finally fix, the language problem in + new lyxtexts, without disabling on-the-fly font changes (Helge's + bug report) + 2005-04-19 Jürgen Spitzmüller * text3.C (dispatch): set cursor on double/triple click events diff --git a/src/text3.C b/src/text3.C index a770c0fb50..b725609dfc 100644 --- a/src/text3.C +++ b/src/text3.C @@ -1115,7 +1115,10 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd) LyXFont const old_font = real_current_font; // Prevents language turds in new lyxtexts under non-english - setCurrentFont(cur); + BufferParams const & bufparams = cur.buffer().params(); + Language const * lang = cur.paragraph().getParLanguage(bufparams); + current_font.setLanguage(lang); + real_current_font.setLanguage(lang); string::const_iterator cit = cmd.argument.begin(); string::const_iterator end = cmd.argument.end();