Voltas not replicated to parts if not applied to top staff (or if top staff is hidden)

• Oct 18, 2018 - 15:32
P1 - High
S3 - Major

When extracting parts from a score with repeat lines above the bar, the repeat lines from the score (although linked to a bar of an instrument that is included in the part) is not shown in the part itself. This seems like a bug to me.


Status (old) active needs info
Status active needs info

What are repeat lines, voltas? Or repeat barlines?
Either work just fine on part extraction for me.
Can you attach a sample score?

Sorry, I see I have not answered your question. With repeat lines I was referring to voltas.
Meanwhile I made a duplicate of my score and deleted everything after the first movement. As you can see in the attachments, the voltas in bar 17/18 are not copied to the extracted part.

Attachment Size
Musescore part extraction example.mscz 56.85 KB

It isn't clear how (or why) you managed to attach voltas to each staff individually, but normally that should not be done. A volta normally appears on only the top staff of the score, and will automatically be applied to each generated part. You can put additional voltas on subsequent staves if you like, but these are deliberately not linked to the part, since the part would normally already have a volta because of the one on the top staff that is automatically duplicated in all parts. I think the problem here is that you didn't actually add a volta to the top staff of your score, as you can see if you disable "Hide empty staves".

So, add the volta to the top staff where it belongs, consider removing the others as they are not actually needed, and all should be well.

Probably we should improve the logic so that if a volta is added to the top visible staff, it is treated as if it had actually been added to the top.

In reply to by Marc Sabatella

I just tested and when I add the voltas to the top staff, they are indeed copied to the part.
I agree that it does not feel logical to add a volta to an empty staff and that adding it to the top visible staff would make more sense. Nevertheless, now I know the logic of the system I can solve the issue in my score for now.

Many thanks!

Title Voltas lost when creating linked parts if top staff is hiden Voltas not replicated to parts if not applied to top staff (or if top staff is hidden)
Severity S4 - Minor S3 - Major
Reported version 2.3  
Priority P1 - High
Regression No
Workaround No

Came up in https://musescore.org/de/node/283142 and I can confirm with MuseScore 3.0.2

Was it the case where you added a volta to the top visible staff and expected it to be treated as if it had been added to the actual top staff? To me, checking for that when adding the volta and then converting it (assigning it track 0, I think) makes sense and should be easy.

Aside from that, it seems "by design" to me.

The I think the fix will be in Score::undoAddElement(), where we exclude such voltas under the comment "only create linked volta for first staff", we'll need to check for system()->firstVisibleStaff(), not just track == 0. We should also think about whether we should actually just assign the volta track 0, so good things happen when you later unhide the other staves.

we should actually just assign the volta track 0

I think this is a good idea. While it's not the best notation, putting a volta on every instrument in the main score is a common notation and needs to be handled in a reasonable manner when parts are created.

I think in creating parts MuseScore should ask itself if there are identical voltas in both track 0 and the current staff, if the answer is yes, only draw one of them. If the answer is no, draw both and let the user figure out what to do about the conflict.

It's a good idea, and this is what we do. As far as I know, it fails only in the case the top staff is hidden (or more specifically, if you didn't add a volta there before hiding it).