Hairpin: when copied, all custom settings are lost and the element resets to default
Reported version
3.3
Priority
P2 - Medium
Type
Functional
Frequency
Once
Severity
S3 - Major
Reproducibility
Always
Status
closed
Regression
No
Workaround
No
Project
OS: Windows 10 (10.0), Arch.: x86_64, MuseScore version (64-bit): 3.3.4.9066, revision: 7684abe
- In Format > Style > Hairpins, ensure that "Placement" is set to the system default, "Below."
- Create a hairpin and set its placement to "Above" in the Inspector.
- Now copy the hairpin to another part of the score.
Expected result: The copied hairpin should also be above the staff.
Actual result: The hairpin reverts to the default "Below" setting.
Fix version
3.5.0
Comments
OS: Windows 10 (10.0), Arch.: x86_64, MuseScore version (64-bit): 3.4.2.9788, revision: 148e43f
On further investigation, it turns out that all customisation is lost when a hairpin is copied: placement, custom length, text, diagonal setting etc.
See https://github.com/musescore/MuseScore/pull/5743.
There are 3 cases to consider here, differentiated by what has been copied:
1. a range selection containing one or more hairpins
2. a single selection consisting of a hairpin
3. a list selection containing one or more hairpins.
Case 1 is already handled correctly. This issue applies to case 2 and case 3, which are similar to each other, but are handled separately. The relevant code for case 2 is in ChordRest::drop(), and the relevant code for case 3 is in Score::pasteSymbols(). Both of these functions disregard the customization of the hairpin that is available to them, and instead use the Score::addHairpin() function to add a fresh new hairpin to the score, for no reason that I can see. The fix is to not use Score::addHairpin(), but rather add a hairpin to the score that has all of the properties of the original element.
Fixed in branch master, commit 306cf054b2
_fix #299768: Hairpin: when copied, all custom settings are lost and the element resets to default
Resolves: https://musescore.org/en/node/299768._
Fixed in branch master, commit dc8bd44011
_Merge pull request #5743 from mattmcclinch/299768-paste-hairpin
fix #299768: Hairpin: when copied, all custom settings are lost and the element resets to default_
Deleted.
Automatically closed -- issue fixed for 2 weeks with no activity.