Skip to content

Commit

Permalink
Fix #320573: [MusicXML import] fretboard frets property not saved in …
Browse files Browse the repository at this point in the history
…MuseScore format

Duplicate of musescore#8036, resp. backport of musescore#8037
  • Loading branch information
Jojo-Schmitz committed Aug 13, 2021
1 parent b3fdbfe commit 223a4e4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions importexport/musicxml/importmxmlpass2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4906,8 +4906,10 @@ FretDiagram* MusicXMLParserPass2::frame()
while (_e.readNextStartElement()) {
if (_e.name() == "frame-frets") {
int val = _e.readElementText().toInt();
if (val > 0)
fd->setFrets(val);
if (val > 0) {
fd->setProperty(Pid::FRET_FRETS, val);
fd->setPropertyFlags(Pid::FRET_FRETS, PropertyFlags::UNSTYLED);
}
else
_logger->logError(QString("FretDiagram::readMusicXML: illegal frame-fret %1").arg(val), &_e);
}
Expand Down
2 changes: 1 addition & 1 deletion mtest/musicxml/io/testChordDiagrams1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
<kind>major</kind>
<frame>
<frame-strings>6</frame-strings>
<frame-frets>5</frame-frets>
<frame-frets>3</frame-frets>
<frame-note>
<string>5</string>
<fret>3</fret>
Expand Down

0 comments on commit 223a4e4

Please sign in to comment.