]> git.lyx.org Git - features.git/commitdiff
* src/text3.C (dispatch): revert previous fix to 3143
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 30 Mar 2007 20:41:38 +0000 (20:41 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 30 Mar 2007 20:41:38 +0000 (20:41 +0000)
* src/text.C (breakParagraph): setCursor does not set current_font when
applied to a CursorSlice (fixes bug 3143)

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

src/text.C
src/text3.C

index 9b37eaa07c0a71f5cce98b0242d1c3227177b15a..b96624bdac4750ede8d3af968f77156b646491e7 100644 (file)
@@ -653,9 +653,9 @@ void LyXText::breakParagraph(LCursor & cur, bool keep_layout)
        // This check is necessary. Otherwise the new empty paragraph will
        // be deleted automatically. And it is more friendly for the user!
        if (cur.pos() != 0 || isempty)
-               setCursor(cur.top(), cur.pit() + 1, 0);
+               setCursor(cur, cur.pit() + 1, 0);
        else
-               setCursor(cur.top(), cur.pit(), 0);
+               setCursor(cur, cur.pit(), 0);
 }
 
 
index d75e34ab4c45a77f099806ec6dba1435fa98e6d3..6af87435249d6b2a1e5a91f689d41376c75e2db5 100644 (file)
@@ -661,8 +661,6 @@ 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;