musescore / musescore/MuseScore
Courtesy accidentals: Incorrect case
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
A courtesy accidental is created two bars distant from the causal accidental.
To Reproduce
Define three shortcuts:
CTL-A: RunPluginAddCourtesyAccidentals
OPT-A: RunPluginRemoveCourtesyAccidentals
CTL-OPT-A: RunPluginConfigCourtesyAccidentals
(1) Run CTL-OPT-A on the score as attached. (See screenshot.) Specify 'Put accidentals in parenthesis'.
See in bar 1 the E#. In bar 3 a courtesy Eb with parentheses has been inserted. (See screenshot.)
Expected behavior
In bar 3 there should be no courtesy Eb.
(2) Run CTL-OPT-A on the score as attached. Uncheck 'Put accidentals in parenthesis'.
A similar error occurs. But see Note.
Screenshots
Original score:

Result for Case (1):

Platform information
MacOS 13.1
Macbook M1 Pro
Additional context
Note: This error did not occur for the CTL-A case.
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 issue with the attached 9:8 bug.mscz.zip score and the RunPluginConfigCourtesyAccidentals shortcut, testing both parenthesized and unparenthesized settings. Trace the courtesy-accidental behavior for the E# in bar 1 and the unexpected Eb in bar 3; done means no courtesy Eb is inserted in bar 3 while the CTL-A case remains unaffected.
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
- 35/100