Importing a 2.x score makes initial clefs lose their customized properties
Reported version
3.3
Type
Functional
Frequency
Once
Severity
S4 - Minor
Reproducibility
Always
Status
active
Regression
Yes
Workaround
Yes
Project
When importing a 2.x score where the initial clef of any staff/part has been set to invisible, this setting gets in 3.32 (at least)
Workaround: make invisible after import
Came up as a side issue of #297326: Crash on opening Musescore 2.x file that uses leading space setting on the initial clef
Comments
I cannot find why, I saw in the debugger that
setFlag(ElementFlag::INVISIBLE, !f)
was clearly executed, withf
beingfalse
.Maybe it has to do with whether the clef is generated or not?
In reply to Maybe it has to do with… by Jojo-Schmitz
You're right! If the tick is 0 then "
delete clef
"! But is there any reason to do that?(EDIT: Found out, see https://musescore.org/en/node/143751#comment-960064. Git blame is nice!)
And not only is visibility lost, other properties such as offset are too.
Which may explain the crash from #297326: Crash on opening Musescore 2.x file that uses leading space setting on the initial clef too, maybe, any possible even lead to a better fix for that
In reply to Which may explain the crash… by Jojo-Schmitz
I investigated and didn't find how to add/change the header clef... (not just
defaultClefType
, but the clef element)Related to #297339: Clef beside header clef saved in 2.x becomes header clef when imported to 3.x, not the same cause.
See https://github.com/musescore/MuseScore/pull/5484.
PR closed.