MuseScore
MuseScore copied to clipboard
System indents due to instrument name even when that instrument is hidden
Issue type
UI bug (incorrect info or interface appearance)
Bug description
See Steps.
Steps to reproduce
- set up 2 instruments: #1 has a name, #2 does not
- hide #1
- notice that system is still intended to accommodate the name of hidden instrument (#1), leaving whitespace with nothing there
Screenshots/Screen recordings
You can observe the issue with the attached file.
MuseScore Version
OS: macOS 14.4, Arch.: x86_64, MuseScore version (64-bit): 4.2.1-240230937, revision: github-musescore-musescore-d757433
Regression
Yes, this used to work in MuseScore 3.x and now is broken
Operating system
macOS 14.4
Additional context
No response
I just noticed that it's not hidden because I clicked the "eye"; if I do that, the indent problem goes away. It's hidden because of "Hide Empty Staves Within Systems".
This is sort of by design; see #8968. If the instrument in question does not appear in any system of a page, then you might think we could ignore that instrument for that page and align the systems based on the other instrument labels only. But that creates more space, and thus may change the distribution of measures over systems, which may result in the instrument becoming visible in one of the systems on the page. This results in an infinite loop if you don't watch out, and even if we'd implement it in a way that doesn't cause a loop, it makes the layout calculations much more complex and laggy. Plus that it's questionable how nice it is if the left margin of the systems is different on each page...
The reason that the instrument is ignored when you hide it using the eye button, is that we are in that case certain that the instrument will never appear at any point in the score, so the aforementioned problems don't occur.
(@oktophonie is that accurate?)
This results in an infinite loop if you don't watch out
How so? Can't we just draw from the top down? We're not going to go back and re-draw the system higher on the page -- that we decided should properly NOT be indented -- because of something that showed up lower down the page that didn't fit before, right?
I don't see a loop. But I do see a bug.
Yes, @cbjeukendrup is spot on.