musescore / musescore/MuseScore

Parts dialog: "Reset" should not immediately recreate the part being reset

Open
#26,878 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

parts
Dominant language
C++
Stars
15.1k
Forks
3.3k
Avg merge
2d 2h
Merged PRs (30d)
91

Description

In the Parts dialog, the "Reset" option does the following:

  1. It deletes the underlying Excerpt for that part
  2. It immediately creates a new Excerpt for that part

Step 2 should not happen. Instead, the new Excerpt should only be created as soon as that part is opened again (or exported via the Export dialog). Basically, the part should go back to the state before it was created for the first time.

Why? For example,

  • it is currently impossible to add/edit/remove local time signatures when parts exist (as in, there are parts for which an Excerpt has been created, so parts that don't really exist but are made up in the UI are not a problem). One may hope that the "Reset" option deletes the Excerpt, so that one can work with local time signatures afterwards, but alas, that doesn't work, because a new Excerpt is created immediately.
  • suppose one has accidentally opened a part, but doesn't need it. After opening, the part's content is populated, increasing the file size, memory usage, corruption risk, etc.. One may hope that the "Reset" option undoes that, but it doesn't.

Tangentially related to https://github.com/musescore/MuseScore/issues/26877. Originates from the discussion starting at https://github.com/musescore/MuseScore/issues/11349#issuecomment-2692829514.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the Parts dialog's Reset action and the lifecycle of the underlying Excerpt. Verify the existing behavior around opening a part and exporting it, then make sure Reset leaves the Excerpt absent until one of those actions occurs. Done means Reset no longer recreates the part immediately while reopening and export still work.

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
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.