Ghost part not attached to any instrument cannot be deleted
I have a very strange corruption in a score I'm working on - there is a part that has no corresponding instrument in the score.
- Open the attached score
- Click File -> Parts
- Observe that there is 1 extra part not listed in the instruments, "Melodica 2". This part cannot be deleted with the "..." menu on its row.
- Open the part, and see that it does not correspond to any staves in the score
Note that the part in question "Melodica 2" is the same part I was having strange copy/paste segfaults on in https://musescore.org/en/node/340864. I worked around that issue by creating a new part, now "REAL Melodica 2" in the attached score, and deleting the original "Melodica 2", so it could be that the ghost part is somehow a leftover from that operation. The only workaround I can think of is creating a whole new score and copying everything real over to it, which is a big hassle since things like time signature changes can't be copied (https://musescore.org/en/node/165746). Otherwise I'm considering delving into the xml and trying to fix it there, but I'm a bit afraid of making things worse..
It gets even weirder.. when I go into the ghost part "Melodica 2" and clear our the first few measures, it actually propagates some strange changes to the "REAL Melodica 2" part.
Ok, I found it was unsafe to even copy from either the corrupted ghost "Melodica 2" or "REAL Melodica 2" parts, since there was some really broken interlinking between the parts, so my solution was to:
1. Create a new clean instrument
2. Manually rewrite the part without copy/pasting from either the corrupted instruments/parts
3. Delete "REAL Melodica 2"
4. In the XML, delete the
Scoreblock for the corrupted ghost "Melodica 2" part
5. Delete corresponding references in the score directory's
Excerptsfolder and reference in
Now things seem to be actually behaving properly.