]> git.lyx.org Git - features.git/commitdiff
Fix bad font toggling after the layout has been changed.
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 27 May 2015 15:04:10 +0000 (17:04 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 27 May 2015 15:06:11 +0000 (17:06 +0200)
When changing the paragraph layout, it is a good idea to call
{{{Cursor::setCurrentFont()}}} to make sure that all is in order.

Fixes bug #4394.

src/Text2.cpp

index 7b3d4da8c614a6c7372f77f3f5a690eb19dfae6e..5a41761c301f29013e7df7244a9160e4aa90ccee 100644 (file)
@@ -199,6 +199,7 @@ void Text::setLayout(Cursor & cur, docstring const & layout)
        pit_type end = cur.selEnd().pit() + 1;
        cur.recordUndoSelection();
        setLayout(start, end, layout);
+       cur.setCurrentFont();
        cur.forceBufferUpdate();
 }