[MusicXML export] invalid XML export: incorrect offset location in harmony

• Apr 24, 2020 - 07:39
Reported version
3.4
Type
Functional
Frequency
Once
Severity
S3 - Major
Reproducibility
Always
Status
active
Regression
No
Workaround
No
Project

Existing bug exposed by new test file testHarmony6 in pull request https://github.com/musescore/MuseScore/pull/5958 commit 6ff0246. File testHarmony6 fails MusicXML schema validation.

Cause:
In the harmony, the offset must be after frame instead of before the frame.

Solution:
In function ExportMusicXml::harmony() swap statements "_xml.tag("offset", offset)" and "fd->writeMusicXML(_xml)" (including the corresponding "if" statements).