Two-note tremolos display incorrectly when the stave has custom scale

• Jan 4, 2021 - 15:06
Reported version
3.5
Type
Functional
Frequency
Once
Severity
S3 - Major
Reproducibility
Always
Status
closed
Regression
Yes
Workaround
No
Project

1) Enter a two-note tremolo with the duration of a half note (or a dotted half note) using Musescore 3.5.

2) Change the tremolo stroke style into "All strokes attached to stems" (using the Inspector).

3) Change the size of the both notes (using the Inspector - Chord - Small), or change the scaling of the stave (Using right-click).

The stroke will not be attached well to the stems anymore as long as the stave scaling and/or notes size changes. As shown in the screenshot below or the attached score file.
Two-note_Tremolo_Test.png


Comments

Title Two-note Tremolo Stroke Style "All strokes attached to stems" displays incorrectly when changing the scaling of staves and chords Two-note tremolos display incorrectly when the stave has custom scale
Regression No Yes
Workaround Yes No

Not just for traditionally styled ones, but for others too... Should be a regression because the mag() calculations were added by me.

Status PR created fixed

Fixed in branch 3.x, commit 82a1fd8429

_fix #315147: two-note tremolos display incorrectly when the stave has custom scale

The issue is caused by the stave scale multiplied twice: once in spatium() and once in mag(). To avoid this, I created a function chordMag() for chords (and also for tremolos which calls the one for chords) which doesn't multiply stave scale, and used that instead of mag() for tremolo calculations._

Fixed in branch master, commit da4543fdea

_fix #315147: two-note tremolos display incorrectly when the stave has custom scale

The issue is caused by the stave scale multiplied twice: once in spatium() and once in mag(). To avoid this, I created a function chordMag() for chords (and also for tremolos which calls the one for chords) which doesn't multiply stave scale, and used that instead of mag() for tremolo calculations._

Fix version
3.6.1