Fixup aeb51be9: set current font correctly when editing inset

When using InsetText::edit(), invoke Cursor::setCurrentFont (note that
editXY does it already). It is a good idea in general, especially
after commit 411333fa95, which sets languagecorrectly in ERT.

This allows to comment out (again!) the trick added to fix ticket #9042.
This commit is contained in:
Jean-Marc Lasgouttes 2020-11-10 15:39:47 +01:00
parent 411333fa95
commit 63300c3ba8

View File

@ -280,6 +280,7 @@ void InsetText::edit(Cursor & cur, bool front, EntryDirection entry_from)
}
cur.top().setPitPos(pit, pos);
cur.setCurrentFont();
cur.finishUndo();
}
@ -294,6 +295,7 @@ void InsetText::doDispatch(Cursor & cur, FuncRequest & cmd)
{
LYXERR(Debug::ACTION, "InsetText::doDispatch(): cmd: " << cmd);
#if 0
// See bug #9042, for instance.
if (isPassThru()) {
// Force any new text to latex_language FIXME: This
@ -305,6 +307,7 @@ void InsetText::doDispatch(Cursor & cur, FuncRequest & cmd)
cur.current_font.setLanguage(latex_language);
cur.real_current_font.setLanguage(latex_language);
}
#endif
switch (cmd.action()) {
case LFUN_PASTE: