Lines in empty measures change length on toggling multimeasure rests
Ubuntu 14.04, GIT commit: 9e4f002
1) new score
2) select measure 1, press "<" to add hairpin
3) press "M" to enable multimeasure rests
4) press "M" to disable them again
Result: the hairpin now extends to the end of the score
I guess upon enabling mmrests, the hairpin length was changed to extend to the end of the mmrest, but then it is not changed back. Not sure that's even possible - how would we know what to change it back to? Probably we should disable the tick adjustment code if endCR() is within an mmrest. I have tried that and it fixes the case at hand, but I would worry this might have a negative effect elsewhere.
Comments
For this issue, I notice a change on February 5.
- On February 4: bad0f6f, I see this at step #3 (press "M" to enable multimeasure rests)
and at step #4 ( disable MM rests)
- On February 5:fa9aaf3, same first result at step #3,
But at step #4:
After checking, might be a side effect of this commit: https://github.com/musescore/MuseScore/commit/cbaf46d2137f8c224969f9810…
or/and this one? https://github.com/musescore/MuseScore/commit/38e8bfc818ec1d69017ae7d10…
Yes, that first commit is where the "tick adjustment code" I mentioned was added. I should have checked the log to see; I actually thought that had been there longer. I was probably thinking of similar code elsewhere.
In that case I feel a bit better about my proposed fix. It definitely doesn't break the case that this code was designed to deal with - #28446: Spanner end is not saved correctly. I could see it still having a similar effect in some other case involving multimeasure rests, but so far I can't make it break. I kind of think anything that *did* break probably wouldn't be any worse than the current behavior. So I guess I will go ahead and submit the PR for review. Still doesn't seem super high priority to me.
https://github.com/musescore/MuseScore/pull/2116
I had actually noticed this a little while ago but never got around to reporting it until being reminded of it in #68401: Lines over empty measures overlap with multimeasure rests.
Sorry for prolong the discussion after the proposal of your patch.
But I don't understand one thing.
Currently, with this nightly fbd255f, the behavior is different of that as described on February 4
Today, eg with "My First Score" (32 measures default), the hairpin is displayed like this at step #3 (so, very short, in comparison of the result on February 4, where the hairpin extends under all the MM rests: see first picture of comment #1)
(At step #4, as always the hairpin extends to the end of the score.)
But if your score is < at 32 measures (31 or 20 or 4 measures, etc.) the hairpin disappears!
(Ditto, at step #4, the hairpin extends to the end.)
Your patch fixes all this?
The "correct" length of a line that ends in the middle of a multimeasure rest is not really meaningful. Different people might have different expections.
My current patch reverts the behavior to what it was before the change you identified. So indeed, it will display short.
I'm not sure what you mean about the hairpin disappearing. I am unable to reproduce any such behavior. Could you describe exactly how to make that happen?
Well, I think to have understood. I don't know if this deserves to be reported.
1) "My First Score"
2) Add a hairpin in the first measure (by drag and drop from Lines palette)
3) Press "M"
4) Press "M" again.
5) Delete (Ctrl + Del) the two last measures (31-32)
6) Press "M" a third time to enable MM rests.
Result: no hairpin
So, I guess that the fact to delete one (or two...) measures in the score clears also the hairpin, such it extended to the (previous) "end" of the score.
I assume these steps are for the current nightly build, so after step 4, the hairpin is extending to the end of the score? With my first, after step four, the hairpin is back to the original one measure. So deleting the last two measure has no effect on the hairpin at all. Meaning after step 6, you still have the same short hairpin. And I assume this was also the case before the aforementioned change.
Also, if on the other hand I replace steps 2-4 with just this:
2) select the whole score
3) press "<" to enter a hairpin
so I end up with what looks like a similar situation - a hairpin extending to the end of the score - it also works fine to delete the last two measures and then press "M". I think this might be what was actually fixed back in February - I have a feeling that before that, you might still lose it. Or lose it on save/restore.
Anyhow, with my fix, so far I can't create a situation in which the hairpin is deleted.
"I assume these steps are for the current nightly build"
Of course, with this one: fbd255f
"so after step 4, the hairpin is extending to the end of the score?"
Yes, it is that.
"2) select the whole score
3) press "<" to enter a hairpin
so I end up with what looks like a similar situation - a hairpin extending to the end of the score - it also works fine to delete the last two measures and then press "M""
Yes, I can reproduce that.
But in despite of a similar situation, I can reproduce the disappearance of the hairpin with "my" steps described previously.
Note that, in my steps in comment #6 (all the steps), I add (step #2) the hairpin by drag and drop (from the Lines palette) in the first measure, not by "Select all", then add hairpin with shortcut.
Fixed in branch master, commit 14ccf0cdcc
fix #68466: spanner changes to length of mmrest
Fixed in branch master, commit 3f29a6c935
Merge pull request #2116 from MarcSabatella/68466-spanner-mmrest
fix #68466: spanner changes to length of mmrest
Fixed in branch 2.0.2, commit ef0368fc3f
fix #68466: spanner changes to length of mmrest
Automatically closed -- issue fixed for 2 weeks with no activity.