From acca44c81ba12ccba55f518e97f12903a68bd743 Mon Sep 17 00:00:00 2001 From: Alexander Pavlov Date: Tue, 21 Jan 2025 18:29:53 +0200 Subject: [PATCH] gp-import: fixed import of multivoice value --- src/importexport/guitarpro/internal/gtp/gp67dombuilder.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/importexport/guitarpro/internal/gtp/gp67dombuilder.cpp b/src/importexport/guitarpro/internal/gtp/gp67dombuilder.cpp index d534331aa9c8a..5b757a6a05434 100644 --- a/src/importexport/guitarpro/internal/gtp/gp67dombuilder.cpp +++ b/src/importexport/guitarpro/internal/gtp/gp67dombuilder.cpp @@ -102,7 +102,11 @@ void GP67DomBuilder::buildGPScore(XmlDomNode* scoreNode) } else if (nodeName == u"Instructions" || nodeName == u"Notices") { // Currently we ignore score unrelated texts } else if (nodeName == u"MultiVoice") { - score->setMultiVoice(currentNode.toElement().text().toInt()); + /// gp saves the value "1>" instead of "1" + String multiVoiceString = currentNode.toElement().text(); + if (!multiVoiceString.empty()) { + score->setMultiVoice(String(multiVoiceString[0]).toInt()); + } } else if (sUnusedNodes.find(nodeName) != sUnusedNodes.end()) { // Ignored nodes, which specify unused specifics (e.g. default layout, footers e.t.c.) }