]> git.lyx.org Git - features.git/commitdiff
Fix bug 3143 by Richard Heck. Background information from Richard:
authorAbdelrazak Younes <younes@lyx.org>
Wed, 28 Mar 2007 15:22:39 +0000 (15:22 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Wed, 28 Mar 2007 15:22:39 +0000 (15:22 +0000)
breakParagraph seems to be called five times: in buffer.C, by
insertStringAsLines; and in text3.C, for LFUN_BREAK_PARAGRAPH,
LFUN_BREAK_PARAGRAPH_KEEP_LAYOUT, LFUN_BREAK_PARAGRAPH_SKIP (which
itself calls LFUN_BREAK_PARAGRAPH if a paragraph will be broken), and
for LFUN_FLOAT_LIST. My sense was that the KEEP_LAYOUT version maybe
shouldn't reset the text style.  That's why I put it where I did. But I
doubt it matters very much, and I had it in breakParagraph myself at one
point.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17612 a592a061-630c-0410-9148-cb99ea01b6c8

src/text3.C

index 85cf5515d6225daac73e3a421b871ca8878b84d6..94827a27132d91fb28165369c526df345ce7f778 100644 (file)
@@ -652,6 +652,8 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
        case LFUN_BREAK_PARAGRAPH:
                cap::replaceSelection(cur);
                breakParagraph(cur, 0);
+               //Reset text style to default
+               setFont(cur, LyXFont(LyXFont::ALL_INHERIT), 0);
                cur.resetAnchor();
                bv->switchKeyMap();
                break;