fix for #63961: save/restore mid-measure barline span correctly #2056
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.
So far I have only a partial fix - the issue with the modified barline not saving / restoring correctly. It seems actually this didn't work at all until a few months ago - see 729a788. Now it works only if adding the barline via drap & drop as opposed to click note / double click palette icon - the latter sets the barline to generated, so it isn't written. Furthermore, if extending the mid-measure barline across multiple staves, it fails on save / reload if extending the barline across more than two staves - this is because the span is set incorrectly (according to my understanding of how it should be set).
These changes don't address the problem of the span not affecting linked parts. That's more complicated, as it will require creating new linked barlines. I'm not sure we can make all possible combinations work, but I'm trying to get the basic case described in the issue report to work. Those changes will be elsewhere in the code.