mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-02 05:55:38 +00:00
Fix wrong indentation on screen.
LyX fails to indent on screen a standard paragraph when it is
nested into an environment. The fix is a one-liner but the diff
is larger because it also fixes a previous wrong indentantion
in the source ;)
No status line needed because this is an extension of f5a246b1
.
This commit is contained in:
parent
33496a0aa5
commit
956f503401
@ -1905,7 +1905,8 @@ int TextMetrics::leftMargin(int max_width,
|
|||||||
|
|
||||||
// This happens after sections or environments in standard classes.
|
// This happens after sections or environments in standard classes.
|
||||||
// We have to check the previous layout at same depth.
|
// We have to check the previous layout at same depth.
|
||||||
if (tclass.isDefaultLayout(par.layout()) && pit > 0) {
|
if (tclass.isDefaultLayout(par.layout()) && pit > 0
|
||||||
|
&& pars[pit - 1].getDepth() >= par.getDepth()) {
|
||||||
pit_type prev = text_->depthHook(pit, par.getDepth());
|
pit_type prev = text_->depthHook(pit, par.getDepth());
|
||||||
if (pars[prev < pit ? prev : pit - 1].layout().nextnoindent)
|
if (pars[prev < pit ? prev : pit - 1].layout().nextnoindent)
|
||||||
parindent.erase();
|
parindent.erase();
|
||||||
|
Loading…
Reference in New Issue
Block a user