mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 03:11:59 +00:00
Preserve paragraph depth when dissolving.
It turns out that makeSameLayout() does more than we want. Fixes bug #11981.
This commit is contained in:
parent
1b137f7d95
commit
69c46c56fe
10
src/Text.cpp
10
src/Text.cpp
@ -1869,8 +1869,14 @@ bool Text::dissolveInset(Cursor & cur)
|
|||||||
DocumentClass const & tclass = cur.buffer()->params().documentClass();
|
DocumentClass const & tclass = cur.buffer()->params().documentClass();
|
||||||
if (inset_it.lastpos() == 1
|
if (inset_it.lastpos() == 1
|
||||||
&& !tclass.isPlainLayout(plist[0].layout())
|
&& !tclass.isPlainLayout(plist[0].layout())
|
||||||
&& !tclass.isDefaultLayout(plist[0].layout()))
|
&& !tclass.isDefaultLayout(plist[0].layout())) {
|
||||||
cur.paragraph().makeSameLayout(plist[0]);
|
// Copy all parameters except depth.
|
||||||
|
Paragraph & par = cur.paragraph();
|
||||||
|
par.setLayout(plist[0].layout());
|
||||||
|
depth_type const dpth = par.getDepth();
|
||||||
|
par.params() = plist[0].params();
|
||||||
|
par.params().depth(dpth);
|
||||||
|
}
|
||||||
|
|
||||||
pasteParagraphList(cur, plist, b.params().documentClassPtr(),
|
pasteParagraphList(cur, plist, b.params().documentClassPtr(),
|
||||||
b.errorList("Paste"));
|
b.errorList("Paste"));
|
||||||
|
Loading…
Reference in New Issue
Block a user