mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-24 18:43:37 +00:00
Do not set layout for no-op paragraph break
When breaking paragraph in an empty top-level paragraph, nothing happens on screen but yet there is an undo step because the layout is reset to what it already was. Avoid this case. Fixes bug #10089.
This commit is contained in:
parent
07c7dae367
commit
2ad52918da
@ -743,6 +743,7 @@ void Text::breakParagraph(Cursor & cur, bool inverse_logic)
|
|||||||
else {
|
else {
|
||||||
docstring const & lay = cur.paragraph().usePlainLayout()
|
docstring const & lay = cur.paragraph().usePlainLayout()
|
||||||
? tclass.plainLayoutName() : tclass.defaultLayoutName();
|
? tclass.plainLayoutName() : tclass.defaultLayoutName();
|
||||||
|
if (lay != layout.name())
|
||||||
setLayout(cur, lay);
|
setLayout(cur, lay);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user