mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-09-19 22:40:26 +00:00
Revert correctly cursor font after undo a font toggle
The recordUndoSelection call was done after the modification of cursor font. This is bad. Fixes: #9537
This commit is contained in:
parent
0299b9bf71
commit
02dcf8ce10
@ -264,6 +264,11 @@ void Text::changeDepth(Cursor & cur, DEPTH_CHANGE type)
|
||||
void Text::setFont(Cursor & cur, Font const & font, bool toggleall)
|
||||
{
|
||||
LASSERT(this == cur.text(), return);
|
||||
|
||||
// If there is a selection, record undo before the cursor font is changed.
|
||||
if (cur.selection())
|
||||
cur.recordUndoSelection();
|
||||
|
||||
// Set the current_font
|
||||
// Determine basis font
|
||||
FontInfo layoutfont;
|
||||
@ -289,7 +294,6 @@ void Text::setFont(Cursor & cur, Font const & font, bool toggleall)
|
||||
return;
|
||||
|
||||
// Ok, we have a selection.
|
||||
cur.recordUndoSelection();
|
||||
Font newfont = font;
|
||||
|
||||
if (toggleall) {
|
||||
|
@ -143,6 +143,8 @@ What's new
|
||||
|
||||
- Fix crash when copying macros with arguments (bug 9418).
|
||||
|
||||
- Fix cursor font after undoing a font-changing command (bug 9537).
|
||||
|
||||
- Fix name and hint of figure captions in documents using the class aastex.
|
||||
|
||||
- Fix output encoding information for non-TeX fonts XeTeX/LuaTeX on preview
|
||||
|
Loading…
Reference in New Issue
Block a user