Collision avoidance remains ON when barlines are hidden in "Staff/Part Properties"

• May 11, 2020 - 18:51
Reported version
P2 - Medium
S3 - Major

OS: Windows 10 (10.0), Arch.: x86_64, MuseScore version (64-bit):, revision: 148e43f

  1. Open the attached file. Note that all staff elements, including barlines, have been made invisible in Staff/Part properties.
  2. Open Style > Fretboard Diagrams and reduce "Default vertical position" so that the Fret Diagrams move down through the staff.

Expected result: All diagrams move downwards to the same extent.
Actual result: The diagrams above the invisible barlines are blocked.

Attachment Size
fretboard_diagram_issue.mscz 3.95 KB


Title Bar lines hidden in "Staff/Part Properties" collide with fretboard diagrams Collision avoidance remains ON when barlines are hidden in "Staff/Part Properties"
Workaround No Yes

It appears that although the bar lines are hidden, collision avoidance for them is still ON when adjusting "Default vertical position" (Style > Fretboard Diagrams). However, if you make the bar lines invisible (shortcut "V"), rather than hiding them via "Staff/Parts Properties", collision avoidance is also turned off and "Default vertical position" works again. (Note: Collision avoidance seems to be OFF when you hide the Clef, Time Sig, Key Sig in "Staff/Part Properties", so, at a guess, it should be the same for barlines).

The workaround is to use the Y-offset in the Inspector to move the diagrams.

Priority P2 - Medium

True. Looks like the barline is being added to the skyline. It isn't if you instead or in addition actually set the barlines invisible or disable autoplace for them, so that's the better workaround I think.

Barlines are added to the skyline in layout.cpp:…

I guess checking the staff property here would fix it, but it also kind of feels like there should be something a bit more global. After all, wouldn't we want then same treatment when suppressing clefs or key signatures or any other elements in staff properties (and I can reproduce the same bug with hidden clef or key signature changes)? Barlines get handled specially in these lines, and time signatures are always skipped (as a hack workaround for some other issue). But everything else is, I think, added a few lines further down in the generic code that applies to all other segment types:…

So maybe these elements that can be suppressed in this way should override addToSkyline() to also check the relevant staff property.