]> git.lyx.org Git - lyx.git/commitdiff
Set current cursor font when toggling emphasize
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 4 Jan 2022 17:58:55 +0000 (18:58 +0100)
committerRichard Kimberly Heck <rikiheck@lyx.org>
Wed, 23 Nov 2022 02:30:03 +0000 (21:30 -0500)
The change actually works for all font toggling with implicit selection.

Fixes bug #12450.

(cherry picked from commit d44c63e2c67cad1bd0dda4cf3e0fa09df5b225ad)

src/Text2.cpp

index 3a7ca6cd9d003da42dea70c87bf77eaa697960c2..961373ce7f8508023ab6cc114fdc0170af41af99 100644 (file)
@@ -432,6 +432,7 @@ void Text::toggleFree(Cursor & cur, Font const & font, bool toggleall)
                cur.clearSelection();
                cur.top() = resetCursor;
                cur.resetAnchor();
+               cur.setCurrentFont();
        }
 }