musescore / musescore/MuseScore
Default key for Transpose dialog set incorrectly
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 15.1k
- Forks
- 3.3k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 91
Description
Issue type
UX/Interaction bug (incorrect behaviour)
Description with steps to reproduce
- Create a new score, key of Ab
- Tools / Transpose
Result: the key selected in the dialog is C, but it should be the key of the score (Ab). Which also means if you then hit OK without making any changes, your score is transposed to C, when it should have no effect.
This is a result of https://github.com/musescore/MuseScore/pull/29996, which removed the check for the current key. It's fine for the radio button state state to be remembered between invocations, and it's fine for the interval itself to be remembered when using that option. And iut's fine for any other option settings to be remembered. But it's not fine for the key to be recalled, because that should always be initialized from the current selection.(or anything other than C)
Supporting files, videos and screenshots
In which versions of MuseScore Studio is this issue present?
4.7.x including current nightly build
Regression
Yes, this used to work in a previous version of MuseScore 4.x
Operating system
Debian 12
Additional context
One especially annoying side effect of this regression is that, since it is far from obvious why the key is defaulting to C, a user may well assume that the problem is that it couldn't detect the key. And thus, if the goal is to transpose down a half step (from Ab to G), you might end up choosing B in this scenario instead of choosing G. And then you'll discover it really does transpose to B and you'll need to transpose a second time to get to G.
Checklist
- This report follows the guidelines for reporting bugs and issues
- I have verified that this issue has not been logged before, by searching the issue tracker for similar issues
- I have attached all requested files and information to this report
- I have attempted to identify the root problem as concisely as possible, and have used minimal reproducible examples where possible
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 at the Tools / Transpose dialog entry point and compare how the key field is initialized with the remembered dialog settings, using the regression introduced by PR #29996 as context. Done means opening Transpose on an Ab score selects Ab and confirming without changes leaves the score unchanged; add or run a regression test if the relevant test location is found.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100