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
This commit is contained in:
Martin Vermeer 2005-04-20 12:31:34 +00:00
parent 67891b48c3
commit 38cc5d1ebc
2 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2005-04-19 Martin Vermeer <martin.vermeer@hut.fi>
* 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 <j.spitzmueller@gmx.de>
* text3.C (dispatch): set cursor on double/triple click events

View File

@ -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();