commit ab1e13702ecdea72c4660f30bd9e55e72b862e6f
Author: Jean-Marc Lasgouttes <[email protected]>
Date:   Wed May 27 17:04:10 2015 +0200

    Fix bad font toggling after the layout has been changed.
    
    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.

diff --git a/src/Text2.cpp b/src/Text2.cpp
index 7b3d4da..5a41761 100644
--- a/src/Text2.cpp
+++ b/src/Text2.cpp
@@ -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();
 }
 

Reply via email to