API-Level in Score Properties dialog shows the one from the version running, rather than the one from the score

• Dec 23, 2016 - 12:45
Reported version
2.1
Type
Functional
Severity
S4 - Minor
Status
closed
Project

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.

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.

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.

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.