mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Fixup 5f8959d4
: keep cursor font when there was no selection
When toggleFree is called without a selection, the only result is to change the cursor currentfont. In the other cases (selection or implicit selection), we want to reset the cursor font from the text font. Fixes bug #12518.
This commit is contained in:
parent
2b493ff70f
commit
32437bd59f
@ -428,7 +428,10 @@ void Text::toggleFree(Cursor & cur, Font const & font, bool toggleall)
|
||||
cur.resetAnchor();
|
||||
}
|
||||
|
||||
cur.setCurrentFont();
|
||||
// if there was no selection at all, the point was to change cursor font.
|
||||
// Otherwise, we want to reset it to local text font.
|
||||
if (cur.selection() || implicitSelection)
|
||||
cur.setCurrentFont();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user