From: Jean-Marc Lasgouttes Date: Tue, 14 Jul 2009 13:32:36 +0000 (+0000) Subject: move some code from InsetCollapsable::doDispatch to InsetText X-Git-Tag: 2.0.0~6028 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=f8f814c3c44dc04804529e75ec87febd39b9b078;p=features.git move some code from InsetCollapsable::doDispatch to InsetText git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30564 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/insets/InsetCollapsable.cpp b/src/insets/InsetCollapsable.cpp index 54110509b4..75c6ef3ab4 100644 --- a/src/insets/InsetCollapsable.cpp +++ b/src/insets/InsetCollapsable.cpp @@ -629,16 +629,6 @@ void InsetCollapsable::doDispatch(Cursor & cur, FuncRequest & cmd) break; default: - if (getLayout().isForceLtr()) { - // Force any new text to latex_language - // FIXME: This should only be necessary in constructor, but - // new paragraphs that are created by pressing enter at the - // start of an existing paragraph get the buffer language - // and not latex_language, so we take this brute force - // approach. - cur.current_font.setLanguage(latex_language); - cur.real_current_font.setLanguage(latex_language); - } InsetText::doDispatch(cur, cmd); break; } diff --git a/src/insets/InsetText.cpp b/src/insets/InsetText.cpp index 079fa34255..709ae04b4f 100644 --- a/src/insets/InsetText.cpp +++ b/src/insets/InsetText.cpp @@ -274,6 +274,19 @@ void InsetText::doDispatch(Cursor & cur, FuncRequest & cmd) LYXERR(Debug::ACTION, "InsetText::doDispatch()" << " [ cmd.action = " << cmd.action << ']'); + // FIXME this use of forceLTR is dubious + // introduced in http://www.lyx.org/trac/changeset/21285 + if (getLayout().isForceLtr()) { + // Force any new text to latex_language FIXME: This + // should only be necessary in constructor, but new + // paragraphs that are created by pressing enter at + // the start of an existing paragraph get the buffer + // language and not latex_language, so we take this + // brute force approach. + cur.current_font.setLanguage(latex_language); + cur.real_current_font.setLanguage(latex_language); + } + switch (cmd.action) { case LFUN_PASTE: case LFUN_CLIPBOARD_PASTE: