1
0
mirror of https://git.lyx.org/repos/lyx.git synced 2025-01-14 04:21:56 +00:00

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
This commit is contained in:
Jean-Marc Lasgouttes 2009-07-14 13:32:36 +00:00
parent e84d752414
commit f8f814c3c4
2 changed files with 13 additions and 10 deletions

@ -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;
}

@ -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: