[LyX/master] Set current cursor font when toggling emphasize

Jean-Marc Lasgouttes lasgouttes at lyx.org
Tue Jan 4 17:32:39 UTC 2022


commit d44c63e2c67cad1bd0dda4cf3e0fa09df5b225ad
Author: Jean-Marc Lasgouttes <lasgouttes at lyx.org>
Date:   Tue Jan 4 18:58:55 2022 +0100

    Set current cursor font when toggling emphasize
    
    The change actually works for all font toggling with implicit selection.
    
    Fixes bug #12450.
---
 src/Text2.cpp |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/Text2.cpp b/src/Text2.cpp
index 66dd083..9026740 100644
--- a/src/Text2.cpp
+++ b/src/Text2.cpp
@@ -425,6 +425,7 @@ void Text::toggleFree(Cursor & cur, Font const & font, bool toggleall)
 		cur.clearSelection();
 		cur.top() = resetCursor;
 		cur.resetAnchor();
+		cur.setCurrentFont();
 	}
 }
 


More information about the lyx-cvs mailing list