Problems with removing empty trailing bars
Hi,
here is a German melody with some chords. Its construction is in this link for all people who can speak German.
https://youtu.be/3sqhHhwYTDI
This very composition ends with an empty bar with chords before it repeats and plays till "Fine". Unfortunately after that empty bar, there are some more empty bars with no chords.
If we go to Tools > Delete empty traling bars, then every empty traling bar will be deleted, even that one with the chords.
I think this bug should be fixed as some songs end with such bars and it is veery tedious to delete bars at the end.
Attachment | Size |
---|---|
After Removing Empty Trailing Bars.png | 196.64 KB |
Before Removing Empty Trailing Bars.png | 34.56 KB |
German song with such property.png | 5.44 KB |
Comments
Please report this in the issue tracker
The workaround is easy though, just select those measures and press Ctrl+Del
Here's the code responsible for this:
Which reveals that it indeed, starting with the last measure, picks on measures with full measure rests, not checking for chord symbols or anything else that would e.g. prevent a staff from getting hidden.
Seems that using the same algorithm that does hide empty staves should get used here.
Another workaround: in that last measure with 2 chord symbols, use 2 rests, or more exact: not a full measure rest.
In reply to Please report this in the… by Jojo-Schmitz
Changing
to
might work, if also fixing a bug in
Measure::isEmpty()
that makes it crash on the-1
, regardless this being documented to work and to check all staves for being empty.For the
else
branch a different approach might be needed though.Thanks for #321227: Problems with removing empty trailing bars
In reply to Thanks for #321227: Problems… by Jojo-Schmitz
Or until it gets fixed, put a whole note in that DC measure, and delete it after the four measures are deleted