I was right, setting true to the third parameter of the scanElements makes invisible elements not participating in the collision detection. More research on how scanElements() works is needed.
With rests there is a workaround: just move them into the staff. For notes however that would change their pitch too, unless you just change their vertical offset and maybe shorten the stem
Not even disabling autoplace for that element helps getting it excluded from skyline
So, it can be relatively easily done so that invisible elements are not included to segments' shape but then it seems that invisible elements still should participate in horizontal placement in some cases (see this message). Zero-height shapes hack makes invisible elements impossible to select. Moreover it is not clear how to treat invisibility for notes given that they can require ledger lines that are managed by chord which cannot be directly made invisible and can have multiple notes. So I am not sure that correct resolving this issue wouldn't require relatively large code changes.
As a workaround for invisible notes I can propose an option with invisible staves: they do participate in playback but not in any kind of placement. That is probably not very convenient but still working way to work around this.
Comments
What is this issue about?
Are they participate in autoplacement? If so, this is probably a result of recently merged https://github.com/musescore/MuseScore/pull/4032
Yes, they do:
see the "Em" in comparison to the "C"
And no, that PR is not the culprit, it got merged after my report
Strange... I remember playing with
buildBspTree
andtrue/false
parameter did the job to exclude hidden elements from the autoplacement algorithm...I was right, setting
true
to the third parameter of thescanElements
makes invisible elements not participating in the collision detection. More research on howscanElements()
works is needed.With rests there is a workaround: just move them into the staff. For notes however that would change their pitch too, unless you just change their vertical offset and maybe shorten the stem
Not even disabling autoplace for that element helps getting it excluded from skyline
So, it can be relatively easily done so that invisible elements are not included to segments' shape but then it seems that invisible elements still should participate in horizontal placement in some cases (see this message). Zero-height shapes hack makes invisible elements impossible to select. Moreover it is not clear how to treat invisibility for notes given that they can require ledger lines that are managed by chord which cannot be directly made invisible and can have multiple notes. So I am not sure that correct resolving this issue wouldn't require relatively large code changes.
As a workaround for invisible notes I can propose an option with invisible staves: they do participate in playback but not in any kind of placement. That is probably not very convenient but still working way to work around this.
Fixed in branch master, commit e11839090a
fix #277367 invisible notes and rests remain part of the skyline
Automatically closed -- issue fixed for 2 weeks with no activity.