From c6b741bf41579b4aa4a98bf4cb9c4c70e20b1ba6 Mon Sep 17 00:00:00 2001 From: Joachim Schmitz Date: Fri, 30 Apr 2021 17:06:33 +0200 Subject: [PATCH] Fix #320573: [MusicXML import] fretboard frets property not saved in MuseScore format Duplicate of #8036, resp. backport of #8037 --- importexport/musicxml/importmxmlpass2.cpp | 6 ++++-- mtest/musicxml/io/testChordDiagrams1.xml | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/importexport/musicxml/importmxmlpass2.cpp b/importexport/musicxml/importmxmlpass2.cpp index 091a1a868ef3a..80b258e9feeca 100644 --- a/importexport/musicxml/importmxmlpass2.cpp +++ b/importexport/musicxml/importmxmlpass2.cpp @@ -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); } diff --git a/mtest/musicxml/io/testChordDiagrams1.xml b/mtest/musicxml/io/testChordDiagrams1.xml index b6ae22e6f960e..42950ba83c654 100644 --- a/mtest/musicxml/io/testChordDiagrams1.xml +++ b/mtest/musicxml/io/testChordDiagrams1.xml @@ -76,7 +76,7 @@ major 6 - 5 + 3 5 3