So it shows 206 in MuseCore 2.0 and 2.1, 300 in MuseScore 3.0, regardless which version the score had been written (or last saved) with.
Opening a 2.0 score should show 206 or 2.06
Opening a 1.x score should show 114 or 1.14
Only opening a 3.0 score should show 300 or 3.00
Comments
I don't quite understand why and where it gets wrong, 1.14 scores are correctly read by read114(), 2.06 score by read206() and priror to that the version is read from the score and set properly (?).
The only other place(s) where it gets set is on reading the palettes
Something to consider: once a score is imported, it's basically no longer an old score. Failing to realize this caused us all sorts of problems in the run up to 2.0, so we changed it to bump the internal version after import. That could be what is going on here. Might be worth maintaining a separate field for display to the user though.
Well, it is only fully imported when it got saved, in which case that field should indeed update
And this does happen for the MuseScore Version field.
Ah, found it, it does get set in layout,cpp, line 3440 , to the latest version.
I missed that, because it doesn't use the setter method but sets it directly.
That reminds me - one of the odd side effects of *not* updating the version was a glitch where some things in a score would suddenly change of their own accord two minutes after loading. Turns out that was when autosave kicked in, which triggered the version bump, which triggered the other changes change. That was, I think, the final straw in deciding we needed to bump the version immediately after import and make sure that the only places we relied on version tests would be during the read/import process.
We should not be showing false information though, so maybe better to remove that field from the score properties dialog?
Or, as I said, maintain this information separately, and not update the user-visible version field until you *actually* save it. Seems that could sometimes be useful information to see.
https://github.com/musescore/MuseScore/pull/2921
And https://github.com/musescore/MuseScore/pull/2936 for 2.1. Here the Situation is slighly different though, here it only forces the 'wrong' version to be shown for 1.x scores
As far as I can see the commit dealing with API level in my PR for the master branch a) conflicts now and b) is not needed anymore , as _mscVersion is no longer altered directly after reload (actually on first layout). Actually it isn't even changed when the score gets changed (i.e. on subsequent re-layouts), only when it gets written. Not sure whether or how to proceed with this.
Maybe we need to revisit this later in the 3.0 development process
The PR for 2.1 is still fully valid though
While the PR does work (for 2.1), with 1.x files it does only until autosave kicks in, at which time MuseScore Version, Revision and API Level are getting updated.
Same problem with 3.0 and 1,x or 2.x files.
The above mentioned problem could get solved by preventing 'imported' 1.x or 2.x scores to get autosaved as long as they have not been changed. Added a commit doing this to my PR for master (adding something equivalent to the 2.1 PR is yet to be done)
See also #152206: programRevision is not shown in Score Properties dialog for score from 2.0 and later
Fixed in branch 2.1, commit 8896b3753d
fix #152211: show correct API level in score properties
Automatically closed -- issue fixed for 2 weeks with no activity.