mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-27 11:52:25 +00:00
Maintain plain layout for separating paragraphs when switching layouts (#11936)
(cherry picked from commit 89d9334e03
)
This commit is contained in:
parent
e3789263ef
commit
028593b979
@ -182,7 +182,10 @@ void Text::setLayout(pit_type start, pit_type end,
|
|||||||
|
|
||||||
for (pit_type pit = start; pit != end; ++pit) {
|
for (pit_type pit = start; pit != end; ++pit) {
|
||||||
Paragraph & par = pars_[pit];
|
Paragraph & par = pars_[pit];
|
||||||
par.applyLayout(lyxlayout);
|
// Is this a separating paragraph?
|
||||||
|
bool const is_separator = par.size() == 1
|
||||||
|
&& par.isEnvSeparator(0);
|
||||||
|
par.applyLayout(is_separator ? bp.documentClass().plainLayout() : lyxlayout);
|
||||||
if (lyxlayout.margintype == MARGIN_MANUAL)
|
if (lyxlayout.margintype == MARGIN_MANUAL)
|
||||||
par.setLabelWidthString(par.expandLabel(lyxlayout, bp));
|
par.setLabelWidthString(par.expandLabel(lyxlayout, bp));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user