musescore / musescore/MuseScore
Add the ability to delete auto-created parts
@bkunda is already working on this.
Since Mar 4, 2025.
- Dominant language
- C++
- Stars
- 15.1k
- Forks
- 3.3k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 91
Description
Long-standing request, but there was no good open feature request for it. Supersedes https://github.com/musescore/MuseScore/issues/11349.
The problem
It is currently not possible to delete parts that were created automatically, in contrast to parts that were created manually.
Why is it necessary to solve this?
It is very possible that someone does not need one or more of the auto-created parts. For example, in a orchestra+choir project, you don't want the individual choir parts, but you want one custom part with all choir parts together. Or when you have multiple percussion instruments, you may not want individual parts for them but one combined part.
Although it's a small effort to deselect the parts you don't want if you have to do that once, it is very tedious if you have to do that every single time, for example every time when re-exporting after every adjustment you make.
Technical background
Those auto-created parts don't really exist, but are 'made up' in the UI layer, and are created for real as soon as you open them (or export them via the Export dialog).
So, even if we showed a delete option in the context menu, it would not do much: it would delete something that is already not stored anywhere. So the next time you open the dialog, you will see the 'deleted' parts back, because the UI makes them up again.
And the reason for not really creating parts in the data layer but making them up in the UI layer, is that it would be wasteful to fully populate the content of all parts immediately when creating a score, because that content won't be needed until the part is opened.
Proposed solution
- Make the data layer smarter: add the ability to add a part to the list of existing parts, without populating its content yet.
- Don't make up not-yet-existing parts in the UI layer. Just display the list from the data layer. Some of the listed parts will have content already, some not, but that doesn't matter, because the content will be populated as soon as needed.
- To still achieve the benefits of the old UI layer solution:
- create not-yet-populated parts when creating the score, and when adding new instruments
- (delete not-yet-populated parts when deleting instruments, just like we do currently for already-populated parts)
- make it easy to add back a part for a specific instrument when it was deleted by accident. (It might suffice to ensure that manually created parts where one instrument was made visible are in no way inferior to automatically created ones.)
With this solution, it is trivial to implement deleting an auto-created part: the delete button will just remove it from the list of existing parts.
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.
Assessment
This issue has not been assessed yet.