Bad barline spans with one-line staves after hiding / removing spanned staves

• Jul 13, 2015 - 00:19
Type
Functional
Severity
S4 - Minor
Status
closed
Project

Ubuntu 14.04, GIT commit: 5c0b817

Reported here: https://musescore.org/en/node/68551. Investigation shows there are multiple aspects to this. The common element is a score for two staves - a five-line and one-line staff - in which bar lines are extended through them. You basically get bad results hiding or removing one of the two staves. The specifics depend on whether you are hiding or deleting a staff, but also on which staff is on top as well as on which staff is hidden or deleted

My forthcoming PR fixes all these cases and hopefully does not create any additional problems. The only glitch is that undo of making the bottom staff invisible (regardless of which of the two is the bottom staff) does not restore the original span of the bar line. But that was the case already, and I really didn't want to risk messing with the undo stack here.


Comments

Title Bar barline spans with one-line staves after hiding / removing spanned staves Bad barline spans with one-line staves after hiding / removing spanned staves
Status (old) active patch (code needs review)

https://github.com/musescore/MuseScore/pull/2119

This PR does fix the issue, including with hide empty staves, but undo definitely is glitchy. And I'm kind of surprised hide empty staves is treated so differently from making a staff invisible (hie emptyy staves was not really invovled at all in this section of code until I added a couple of checks). So manybe there is a better way to deal with all this. Anyhow, this is as far as I expect to take this.

(Nightly: 096e59f). See attached file. A related case from https://musescore.org/en/node/6924.

Open the guitar duet (staff/TAB) template. Go into continuous view. Open the instruments window and hide "Gtr 2." Click OK. Now go back to Instruments, make "Gtr 2" visible and hide "Gtr 1." Click OK. Now in continuous view you have a staff with no bar-lines! They will reappear however when you go into page view.

Attachment Size
no_bar_lines.mscz 12.43 KB