Drag trail with dynamics starting with "f"
Config: MuseScore cf50003 on Xubuntu 14.10.
Some dynamics (fz, fp, fff, ff and f) let a trace on the screen when they are dragged. Example with dynamic f:
The culprit seems to be the commit aa6b0c8.
Some discussion about that here: #38136: Regression with dynamics
Comments
Also, see #13879: Dragging glissando and tremolo from palette produces trail effect
After a little testing, I manage to pin down the problem to this line:
https://github.com/musescore/MuseScore/blob/master/libmscore/text.cpp#L…
{syntaxhighlighter brush:c++;first-line:300;}
r.setX(0); //HACK{/syntaxhighlighter}
This (together with the follwing lines) change the _bbox at line 303 of text.cpp. This bounding box is then used when dragging to compute the area to be updated.
The problem, as Marc Sabatella already pointed out in #7 in issue report #38136: Regression with dynamics is that the fortissimo character extends outside this bounding box.
I found that if I comment out this line 300 of text.cpp (i.e. the relative x position of the bbox is not reset to 0), then the trail disappears, and in the meantime bug #25922: Right aligned text does not align correctly does not reappear. In my (very) quick tests this change does not seem to introduce problems in other texts, but maybe Werner knows better what would be affected.
I assume the comment above that line is relevant, but I'm not sure what exactly it refers to. I would note that the change in question seems to have been made for the sake of courtesy time signatures - at least, it is part of a commit that otherwise, I think, had to do with them. That fix was made for #30941: Layout changes after Select All, and probably in particular for the score in comment #3. But a couple of the other changes in that commit were things that were later fine-tuned a bit more. So it's *possible* the "hack" referred to here is no longer needed to fix that issue? Since you have it built that way, could you test and see if you can reproduce [#39041], in particular using the score in #3? Not that this would prove anything in itself, but would be interesting to know.
I can't reproduce the problem with the score in #3 with that line commented out, under Linux Mint 17 or Windows 8.1, but I don't know if I could reproduce the problem before all the fixes (I didn't check). I still see the problem I saw in #17 of #30941: Layout changes after Select All only under Windows 8.1.
I only see 14 comments in that issue?
...Ooops, I meant #8
:-)