Skip to content

Commit

Permalink
ENG-19: Correctly omit instrument names
Browse files Browse the repository at this point in the history
Previously, instrument names were erroneously included based on the
MIDI instrument associated with a part, even when print-object="no" was
specified in the XML. This commit makes sure that those MIDI part names
are overridden in the case that print-object="no" is specified.
  • Loading branch information
iveshenry18 committed Jun 22, 2021
1 parent fa30b31 commit 24d892e
Show file tree
Hide file tree
Showing 5 changed files with 2,218 additions and 0 deletions.
4 changes: 4 additions & 0 deletions importexport/musicxml/importmxmlpass2.cpp
Expand Up @@ -1655,8 +1655,12 @@ void MusicXMLParserPass2::part()
_pass1.getPart(id)->setPartName(mxmlPart.getName());
if (mxmlPart.getPrintName())
_pass1.getPart(id)->setLongName(mxmlPart.getName());
else
_pass1.getPart(id)->setLongName("");
if (mxmlPart.getPrintAbbr())
_pass1.getPart(id)->setPlainShortName(mxmlPart.getAbbr());
else
_pass1.getPart(id)->setPlainShortName("");
// try to prevent an empty track name
if (_pass1.getPart(id)->partName() == "") {
QString instrId = _pass1.getInstrList(id).instrument(Fraction(0, 1));
Expand Down
Binary file added mtest/musicxml/io/testPartNames.pdf
Binary file not shown.

0 comments on commit 24d892e

Please sign in to comment.