Add symbols to barlines

• Apr 4, 2019 - 23:35
Reported version
3.0
Priority
P2 - Medium
Type
Functional
Frequency
Once
Severity
S5 - Suggestion
Reproducibility
Always
Status
closed
Regression
No
Workaround
No
Project

It sometimes comes up that the best way to solve some particular problem would be to attach a symbol to a barline (eg, think about the commonly-requested multimeasure repeat symbol). But we don't support symbols on barlines, so you end up settling for attaching to the first note or rest in the bar then moving manually.

We already support fermatas on barlines, it's trivial to add support for symbols (and mages too, why not). Only issue is that we don't really handle linking of barlines between score and parts, I guess due to their generated status. I resisted changing this in my PR https://github.com/musescore/MuseScore/pull/4843, but maybe that should be revisited. At least my code there doesn't break if the links show up, and really, we can't depend on links for the types of things my code is doing, so really, that code is good even if we add links.

I have the code to add the symbols, but I think there is no sense making a PR until I deal with the link issue, and that may end up waiting.


Comments

Status PR created fixed

Fixed in branch master, commit 4eadb70636

_fix #287245: allow symbols and images on barlines

It sometimes comes up that the best way to solve some particular problem
would be to attach a symbol to a barline
(eg, think about the commonly-requested multimeasure repeat symbol).
But we don't support symbols on barlines, so you end up settling for
attaching to the first note or rest in the bar then moving manually,
and this adjustment does not necessarily survicve layout changes.

This commit adds direct support for symbols on barlines.
Also images, since the code involved is so similar, they are handled here as well.
Symbols and images are recorded as child elements,
which were already being laid out so no special handling was needed
beyond adding & removing, reading nd writing.
Although I did need to make sure the track & score were managed correctly._

Fix version
3.3.0