From: Martin Vermeer Date: Thu, 13 Sep 2007 14:29:44 +0000 (+0000) Subject: Force current font to red typewriter in ERT X-Git-Tag: 1.6.10~8363 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=a750970781eb5d6873130d0f753b3978be246f64;p=features.git Force current font to red typewriter in ERT git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20261 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/insets/InsetERT.cpp b/src/insets/InsetERT.cpp index cdb783ed1e..077e8870ed 100644 --- a/src/insets/InsetERT.cpp +++ b/src/insets/InsetERT.cpp @@ -196,6 +196,9 @@ int InsetERT::docbook(Buffer const &, odocstream & os, void InsetERT::doDispatch(Cursor & cur, FuncRequest & cmd) { + BufferParams const & bp = cur.buffer().params(); + LayoutPtr const layout = + bp.getTextClass().defaultLayout(); //lyxerr << "\nInsetERT::doDispatch (begin): cmd: " << cmd << endl; switch (cmd.action) { @@ -229,9 +232,6 @@ void InsetERT::doDispatch(Cursor & cur, FuncRequest & cmd) // attributes. // FIXME: Change only the pasted paragraphs - BufferParams const & bp = cur.buffer().params(); - LayoutPtr const layout = - bp.getTextClass().defaultLayout(); Font font = layout->font; // ERT contents has always latex_language font.setLanguage(latex_language); @@ -255,10 +255,10 @@ void InsetERT::doDispatch(Cursor & cur, FuncRequest & cmd) // start of an existing paragraph get the buffer language // and not latex_language, so we take this brute force // approach. - // FIXME: what to do with those? - //text_.current_font.setLanguage(latex_language); - //text_.real_current_font.setLanguage(latex_language); - + cur.current_font = layout->font; + cur.real_current_font = layout->font; + cur.current_font.setLanguage(latex_language); + cur.real_current_font.setLanguage(latex_language); InsetCollapsable::doDispatch(cur, cmd); break; }