fix #279415, fix #288283: calculation of prev/next visible spanned staff #4964
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See https://musescore.org/en/node/279415 and https://musescore.org/en/node/288283.
This change started as a one-line for the second of these two issues. All that was necessary was to remove the check for s->invisible() in BarLine::getY() that was added as part of a much larger change here:
337e885#diff-8ba9840a2952d25d7198fc9c78e30b16R200
But, as I thought through what that code was doing, I realized it is exactly the code we needed in BarLine::isBottom() in order to fully fix the other bug I mentioned. I didn't understand enough about the barline architecture back when I did the partial fix for that a few months ago to finish the job, so I had left a TODO.
So I factored that code out as a new function nextVisibleSpannedStaff(), added a corresponding prevVisibleSpannedStaff(), and used these functions in getY(), isBottom(), and also isTop() (which suffered the same bug).