First-line indentation causes multiple alignment errors.

• Jan 20, 2021 - 04:25
Reported version
3.6
Type
Functional
Frequency
Once
Severity
S3 - Major
Reproducibility
Always
Status
closed
Regression
Yes
Workaround
Yes
Project

1) Create a new piano score.

2) Enter a passage for the first two bars (I entered in the first bars of Liszt's Un_Sopsiro.mscz), so that the entire first bar would be stretched out over the entire line.

3) Decrease the layout stretch so that the both the first two bars appear on the first line together.

Multiple alignment issues are apparent, such as the staff-lines not extending to the barline at the end of the first system.
Disabling indentation of the first system fixes these errors.


Comments

Status active duplicate
Workaround No Yes

I think what is happening is that the indent is added after we've already made the call as to how many measures will fit on this system. The reality is, we're wrong - the indent doesn't allow for two measures, it just makes the available width not enough for two measures.

Best workaround here is to simply add the system break after the first bar manually, that's all you can fit and what would happen anyhow if/when the bug gets fixed. Or, if you really want both measures to fit, removing the indent, or reducing spacing or staff size.

Status PR created fixed

Fixed in branch 3.x, commit f95eeb92ce

_fix #315841: indent can cause measures to not fit on system

Resolves: https://musescore.org/en/node/315841

The first system indent setting does it what it says,
but it doens't actually add the space until after
we've collected the measures to fit on the system.
This can result in one too many measures being added to the system
(actually could be more than one if you have a crazy big indent).
The result is the measures will overflow into the margin.

This commit fixes the issue by accounting for the indent
on the first layout of the system when laying out its first measure.
This is the same time we allocate space for the instrument names,
so it makes sense to handle indent here as well.
In fact, that already happens on the subsequent system layout
that happens after measures are collected.
There is even code to do a "max" betwene indent and instrument names.
So it seems natural to incorporate the indent during that first layout._

Fix version
3.6.1