void InsetERT::doDispatch(Cursor & cur, FuncRequest & cmd)
{
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) {
//lyxerr << "\nInsetERT::doDispatch (begin): cmd: " << cmd << endl;
switch (cmd.action) {
// attributes.
// FIXME: Change only the pasted paragraphs
// 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);
Font font = layout->font;
// ERT contents has always latex_language
font.setLanguage(latex_language);
// start of an existing paragraph get the buffer language
// and not latex_language, so we take this brute force
// approach.
// 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;
}
InsetCollapsable::doDispatch(cur, cmd);
break;
}