Extra initial clef in scores imported from 2.x
Reported version
3.0
Priority
P1 - High
Type
Functional
Frequency
Once
Severity
S3 - Major
Reproducibility
Always
Status
closed
Regression
No
Workaround
Yes
Project
1) create a score in 2.x using two or more staves (or download the attached)
2) load it into 3.0
3) save
4) close
5) reload
Result: all staves after the first show an extra clef after the header
Workaround - you can delete them and re-save and they stay deleted.
(BTW, I'd have called this "normal" instead of "major" if that were available, but it's more than "minor")
Comments
confirmed, seen that when converting the templates to 3.0
This seems to apply only when positions reset is accepted, isn't it? Or did you notice the same issue without positions reset?
If I am correct with my assumption, here is the fix: https://github.com/musescore/MuseScore/pull/4281.
Actually I can't reproduce at the moment (had seen it pre-beta), and contrary to the initial report's text, there is no attachment.
Interesting, I can no longer reproduce either.
I can reproduce with this file (from compat206 mtest) and with resetting elements positions. This case is what is addressed in my PR.
Weird, I still can't. Not with a build I made last night anyhow. But, your change looks to be good insurance anyhow?
I do wonder, though, we have had issues where people would make some adjustment to a generated element - like the courtesy key signature at the end of a system, making it invisible or changing its horizontal offset - and this would make it non-generated and then bad things would happen. See for example #191426: Added key signature disappears after view change if its courtesy key is invisible. I remember forum discussions too with more detail but can't find them now. Anyhow, the point is, definitely worth testing around this (make some adjustment to a generated element, see if it marks it non-generated, then see if behavior of reset is as expected).
Fixed in branch master, commit c1a232142b
fix #277956: do not reset positions for generated elements
Fixed in branch master, commit c6e323c0fc
Merge pull request #4281 from dmitrio95/reset-positions-no-generated
fix #277956: do not reset positions for generated elements
I once suggested that we add a modified flag, so that generated elements can remain generated. I don't think it sparked any discussion, though.
That could probably be good once we have an architecture that allows us to ensure that this flag's value is always properly maintained. Right now introducing this flag would probably be a large pain.
What I am suggesting is to modify an element's modified property instead of its generated property everywhere that currently occurs. The generated property will be set only once, when the element is created. We would only check the modified property in places we currently check the generated property. The current meaning of
generated()
would becomegenerated() && !modified()
, but this will also allow us to check whether or not an element that has been modified was originally generated, which is something that currently cannot be done.Automatically closed -- issue fixed for 2 weeks with no activity.