musescore / musescore/MuseScore
Courtesy accidentals not quite working
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 15.1k
- Forks
- 3.3k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 91
Description
Describe the bug
- Courtesy accidentals without parentheses need to be removed before courtesy accidentals with parentheses will work.
- Courtesy accidentals with parentheses need to be removed before courtesy accidentals without parentheses will work.
To Reproduce
Define three shortcuts:
- CTL-A: RunPluginAddCourtesyAccidentals
- OPT-A: RunPluginRemoveCourtesyAccidentals
- CTL-OPT-A: RunPluginConfigCourtesyAccidentals
(1) Do CTL-A.
Result: Courtesy accidentals are added correctly, without parentheses.
(2) Do CTL-OPT-A; Tick checkbox "Put accidentals in parenthesis"; Click "Add accidentals".
Result: No change.
Note: The same problem applies if (1) and (2) are reversed.
Expected behavior
After (2), the parentheses should be added.
Screenshots

Platform information
MacOS 13.1
Macbook M1 Pro
Additional context
Add any other context about the problem here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the sequence with RunPluginAddCourtesyAccidentals, RunPluginRemoveCourtesyAccidentals, and RunPluginConfigCourtesyAccidentals using the attached CA Test again.mscz file. Compare adding accidentals with and without the “Put accidentals in parenthesis” checkbox after each order of operations. Done means both forms can be applied successively and the expected parentheses appear.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100