From: Jean-Marc Lasgouttes Date: Tue, 10 Nov 2020 14:39:47 +0000 (+0100) Subject: Fixup aeb51be9: set current font correctly when editing inset X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=63300c3ba89ba1f196b8d436f09a2279d6780de0;p=features.git 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. --- diff --git a/src/insets/InsetText.cpp b/src/insets/InsetText.cpp index f72b9a6396..ec223fa83a 100644 --- a/src/insets/InsetText.cpp +++ b/src/insets/InsetText.cpp @@ -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: