musescore / MuseScore

MuseScore is an open source and free music notation software. For support, contribution, bug reports, visit MuseScore.org. Fork and make pull requests!
https://musescore.org
Other
12.15k stars 2.63k forks source link

Graphical glitch with bend arrowhead during playback #19885

Closed DmitryArefiev closed 10 months ago

DmitryArefiev commented 11 months ago

Issue type

UI bug

Steps to reproduce

https://github.com/musescore/MuseScore/assets/90187801/c0cf11f3-cf95-4e2d-a769-13229728279c

MuseScore Version

4.2.0 master

Regression

Yes, this used to work in MuseScore 4.1.1

Operating system

Windows 10

Additional context

No response

oktophonie commented 11 months ago

See also: https://github.com/musescore/MuseScore/issues/19924

mike-spa commented 10 months ago

I can't reproduce this on my machine, unfortunately. If someone can find more detailed steps to cause this, please let me know

DmitryArefiev commented 10 months ago

@mike-spa I see it became a little bit better but sill occurs on my side. Try to reproduce it on different zoom levels

https://github.com/musescore/MuseScore/assets/90187801/6792c504-696e-420b-9a0b-ba25b2f35f1c

bends.zip

Also, what display resolution are you using?

cbjeukendrup commented 10 months ago

I've found the cause of this issue:

So, the "erasing" effect happens because when the area where the cursor has just moved away is being redrawn, the bend (or other element) on that position is not considered as being part of that area, so is not redrawn when redrawing that area; and it is caused by the BBox being calculated incorrectly.

Especially the case of the TAB numbers background makes me wonder about something: it looks like we actually need two bounding boxes, one for layout purposes (which is generated based on the Shape) and another one for redrawing purposes (and another one for clickable area?? but I believe we already have that). For those TAB numbers, the layout should only consider the number itself, as it does currently, but for redrawing, the bounding box of the background must also be considered.

Anyway, @mike-spa this seems to bring this issue back to the Engraving team :)

mike-spa commented 10 months ago

@cbjeukendrup thanks so much. I've made a quick fix for bends which fixes the most obvious issue (half of the arrow was being left out of the bounding box). The "erasing" will still happen if one deforms the curve like you did there, but in no real world case can the curve of the bend end up further right than the edge of the arrow, so we'll take it for now. In future, it may be worth doing a more serious refinement of the bend Shape (i.e. break it down into more rectangles). I believe someone also complained about the clickable area being too large.

Having said all that: your investigation doesn't explain the disappearing tuplets from the referred issue. If anyone can reproduce that, let me know

cbjeukendrup commented 10 months ago

your investigation doesn't explain the disappearing tuplets from the referred issue.

True. I could not reproduce that issue, and wouldn't have any explanation for it so far.

DmitryArefiev commented 10 months ago

Fixed in #20322