]> git.lyx.org Git - features.git/commitdiff
move some code from InsetCollapsable::doDispatch to InsetText
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 14 Jul 2009 13:32:36 +0000 (13:32 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 14 Jul 2009 13:32:36 +0000 (13:32 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30564 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/InsetCollapsable.cpp
src/insets/InsetText.cpp

index 54110509b4286097ad5d0fa2b90e908cf2139b8b..75c6ef3ab4ab977557d222f4b9a46a5ea9974cb5 100644 (file)
@@ -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;
        }
index 079fa342551e356bb845d03f27ac5cd33de37e75..709ae04b4f16b272f8df511466723dbd06fd00a3 100644 (file)
@@ -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: